summaryrefslogtreecommitdiffstats
path: root/mm/vmstat.c
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-09-25 23:31:49 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-26 08:48:51 -0700
commit39bbcb8f88154c4ac9853baf3f1134af4c987517 (patch)
tree79f9867ead896c28d138545089e6d85db426c09f /mm/vmstat.c
parent006d22d9bbb7e66279ba5cc4556b54eeaf8fd556 (diff)
downloadlinux-39bbcb8f88154c4ac9853baf3f1134af4c987517.tar.gz
linux-39bbcb8f88154c4ac9853baf3f1134af4c987517.tar.bz2
linux-39bbcb8f88154c4ac9853baf3f1134af4c987517.zip
[PATCH] mm: do not check unpopulated zones for draining and counter updates
If a zone is unpopulated then we do not need to check for pages that are to be drained and also not for vm counters that may need to be updated. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r--mm/vmstat.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 04a9093f649e..968c0072e19a 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -321,6 +321,9 @@ void refresh_cpu_vm_stats(int cpu)
for_each_zone(zone) {
struct per_cpu_pageset *pcp;
+ if (!populated_zone(zone))
+ continue;
+
pcp = zone_pcp(zone, cpu);
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)