]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] mm: do not check unpopulated zones for draining and counter updates
authorChristoph Lameter <clameter@sgi.com>
Tue, 26 Sep 2006 06:31:49 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Sep 2006 15:48:51 +0000 (08:48 -0700)
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>
mm/page_alloc.c
mm/vmstat.c

index cc64830475676088ee056bc94c0f07fd54c14b01..f7ea020c23ea886c63111c2bdd9ce40ee866da97 100644 (file)
@@ -633,7 +633,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
 #ifdef CONFIG_NUMA
 /*
  * Called from the slab reaper to drain pagesets on a particular node that
- * belong to the currently executing processor.
+ * belongs to the currently executing processor.
  * Note that this function must be called with the thread pinned to
  * a single processor.
  */
@@ -647,6 +647,9 @@ void drain_node_pages(int nodeid)
                struct zone *zone = NODE_DATA(nodeid)->node_zones + z;
                struct per_cpu_pageset *pset;
 
+               if (!populated_zone(zone))
+                       continue;
+
                pset = zone_pcp(zone, smp_processor_id());
                for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
                        struct per_cpu_pages *pcp;
index 04a9093f649eb8ea7198bb082c4f5def3b8bd7b9..968c0072e19a17ef729fccc612427f44878b926f 100644 (file)
@@ -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++)