diff options
Diffstat (limited to 'kernel/power/snapshot.c')
| -rw-r--r-- | kernel/power/snapshot.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index d9191b40cf6e..ac7eb109f196 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
| @@ -46,7 +46,12 @@ static void swsusp_unset_page_forbidden(struct page *); | |||
| 46 | * size will not exceed N bytes, but if that is impossible, it will | 46 | * size will not exceed N bytes, but if that is impossible, it will |
| 47 | * try to create the smallest image possible. | 47 | * try to create the smallest image possible. |
| 48 | */ | 48 | */ |
| 49 | unsigned long image_size = 500 * 1024 * 1024; | 49 | unsigned long image_size; |
| 50 | |||
| 51 | void __init hibernate_image_size_init(void) | ||
| 52 | { | ||
| 53 | image_size = ((totalram_pages * 2) / 5) * PAGE_SIZE; | ||
| 54 | } | ||
| 50 | 55 | ||
| 51 | /* List of PBEs needed for restoring the pages that were allocated before | 56 | /* List of PBEs needed for restoring the pages that were allocated before |
| 52 | * the suspend and included in the suspend image, but have also been | 57 | * the suspend and included in the suspend image, but have also been |
