Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] swsusp: fix memory shrinker

Fix a bug in the swsusp's memory shrinker that causes some systems using
highmem to refuse to suspend to disk if image_size is set above 1/2 of
available RAM.

Special thanks to Jiri Slaby for reporting the problem and assistance in
debugging it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Rafael J. Wysocki and committed by
Linus Torvalds
c75fd0ee 418106d6

+1 -1
+1 -1
kernel/power/swsusp.c
··· 229 229 size += highmem_size; 230 230 for_each_zone (zone) 231 231 if (populated_zone(zone)) { 232 + tmp += snapshot_additional_pages(zone); 232 233 if (is_highmem(zone)) { 233 234 highmem_size -= 234 235 zone_page_state(zone, NR_FREE_PAGES); 235 236 } else { 236 237 tmp -= zone_page_state(zone, NR_FREE_PAGES); 237 238 tmp += zone->lowmem_reserve[ZONE_NORMAL]; 238 - tmp += snapshot_additional_pages(zone); 239 239 } 240 240 } 241 241