diff options
author | Christoph Lameter <clameter@sgi.com> | 2007-02-10 04:43:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:17 -0500 |
commit | d23ad42324cc4378132e51f2fc5c9ba6cbe75182 (patch) | |
tree | 6844416befb3988e432e8f422f3a369e2f760d39 /kernel/power/swsusp.c | |
parent | c878538598d1e7ab41ecc0de8894e34e2fdef630 (diff) |
[PATCH] Use ZVC for free_pages
This is again simplifies some of the VM counter calculations through the use
of the ZVC consolidated counters.
[michal.k.k.piotrowski@gmail.com: build fix]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 31aa0390c777..7fb834397a0d 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -230,9 +230,10 @@ int swsusp_shrink_memory(void) | |||
230 | for_each_zone (zone) | 230 | for_each_zone (zone) |
231 | if (populated_zone(zone)) { | 231 | if (populated_zone(zone)) { |
232 | if (is_highmem(zone)) { | 232 | if (is_highmem(zone)) { |
233 | highmem_size -= zone->free_pages; | 233 | highmem_size -= |
234 | zone_page_state(zone, NR_FREE_PAGES); | ||
234 | } else { | 235 | } else { |
235 | tmp -= zone->free_pages; | 236 | tmp -= zone_page_state(zone, NR_FREE_PAGES); |
236 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; | 237 | tmp += zone->lowmem_reserve[ZONE_NORMAL]; |
237 | tmp += snapshot_additional_pages(zone); | 238 | tmp += snapshot_additional_pages(zone); |
238 | } | 239 | } |