diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-26 13:13:19 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-26 13:13:19 -0400 |
commit | c226951b93f7cd7c3a10b17384535b617bd43fd0 (patch) | |
tree | 07b8796a5c99fbbf587b8d0dbcbc173cfe5e381e /kernel/power/swsusp.c | |
parent | b0df3bd1e553e901ec7297267611a5db88240b38 (diff) | |
parent | e8216dee838c09776680a6f1a2e54d81f3cdfa14 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 17f669c83012..8ef677ea0cea 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -193,14 +193,13 @@ int swsusp_shrink_memory(void) | |||
193 | printk("Shrinking memory... "); | 193 | printk("Shrinking memory... "); |
194 | do { | 194 | do { |
195 | size = 2 * count_highmem_pages(); | 195 | size = 2 * count_highmem_pages(); |
196 | size += size / 50 + count_data_pages(); | 196 | size += size / 50 + count_data_pages() + PAGES_FOR_IO; |
197 | size += (size + PBES_PER_PAGE - 1) / PBES_PER_PAGE + | ||
198 | PAGES_FOR_IO; | ||
199 | tmp = size; | 197 | tmp = size; |
200 | for_each_zone (zone) | 198 | for_each_zone (zone) |
201 | if (!is_highmem(zone) && populated_zone(zone)) { | 199 | if (!is_highmem(zone) && populated_zone(zone)) { |
202 | tmp -= zone->free_pages; | 200 | tmp -= zone->free_pages; |
203 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; | 201 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; |
202 | tmp += snapshot_additional_pages(zone); | ||
204 | } | 203 | } |
205 | if (tmp > 0) { | 204 | if (tmp > 0) { |
206 | tmp = __shrink_memory(tmp); | 205 | tmp = __shrink_memory(tmp); |