提交 39bbcb8f 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[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: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 006d22d9
...@@ -633,7 +633,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order, ...@@ -633,7 +633,7 @@ static int rmqueue_bulk(struct zone *zone, unsigned int order,
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
/* /*
* Called from the slab reaper to drain pagesets on a particular node that * 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 * Note that this function must be called with the thread pinned to
* a single processor. * a single processor.
*/ */
...@@ -647,6 +647,9 @@ void drain_node_pages(int nodeid) ...@@ -647,6 +647,9 @@ void drain_node_pages(int nodeid)
struct zone *zone = NODE_DATA(nodeid)->node_zones + z; struct zone *zone = NODE_DATA(nodeid)->node_zones + z;
struct per_cpu_pageset *pset; struct per_cpu_pageset *pset;
if (!populated_zone(zone))
continue;
pset = zone_pcp(zone, smp_processor_id()); pset = zone_pcp(zone, smp_processor_id());
for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) { for (i = 0; i < ARRAY_SIZE(pset->pcp); i++) {
struct per_cpu_pages *pcp; struct per_cpu_pages *pcp;
......
...@@ -321,6 +321,9 @@ void refresh_cpu_vm_stats(int cpu) ...@@ -321,6 +321,9 @@ void refresh_cpu_vm_stats(int cpu)
for_each_zone(zone) { for_each_zone(zone) {
struct per_cpu_pageset *pcp; struct per_cpu_pageset *pcp;
if (!populated_zone(zone))
continue;
pcp = zone_pcp(zone, cpu); pcp = zone_pcp(zone, cpu);
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册