aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-05-15 05:39:48 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-05-17 17:19:19 -0400
commit1c1be3a949a61427a962771c85a347c822aeb991 (patch)
treef87ed0b7a008cfe5fb4bcb338352cc3febed18d5 /kernel/power/snapshot.c
parentddeb648708108091a641adad0a438ec4fd8bf190 (diff)
Revert "PM / Hibernate: Reduce autotuned default image size"
This reverts commit bea3864fb627d110933cfb8babe048b63c4fc76e (PM / Hibernate: Reduce autotuned default image size), because users are now able to resolve the issue this commit was supposed to address in a different way (i.e. by using the new /sys/power/reserved_size interface). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r--kernel/power/snapshot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index d69e3323a85d..ace55889f702 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -54,15 +54,15 @@ void __init hibernate_reserved_size_init(void)
54 54
55/* 55/*
56 * Preferred image size in bytes (tunable via /sys/power/image_size). 56 * Preferred image size in bytes (tunable via /sys/power/image_size).
57 * When it is set to N, the image creating code will do its best to 57 * When it is set to N, swsusp will do its best to ensure the image
58 * ensure the image size will not exceed N bytes, but if that is 58 * size will not exceed N bytes, but if that is impossible, it will
59 * impossible, it will try to create the smallest image possible. 59 * try to create the smallest image possible.
60 */ 60 */
61unsigned long image_size; 61unsigned long image_size;
62 62
63void __init hibernate_image_size_init(void) 63void __init hibernate_image_size_init(void)
64{ 64{
65 image_size = (totalram_pages / 3) * PAGE_SIZE; 65 image_size = ((totalram_pages * 2) / 5) * PAGE_SIZE;
66} 66}
67 67
68/* List of PBEs needed for restoring the pages that were allocated before 68/* List of PBEs needed for restoring the pages that were allocated before