Commit c75fd0ee6e1750e6e527ed1d4aeee66739d9ad79
Committed by
Linus Torvalds
1 parent
418106d624
Exists in
master
and in
20 other branches
[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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
kernel/power/swsusp.c
... | ... | @@ -229,13 +229,13 @@ |
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 |