aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/mm
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-04-28 05:12:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:18 -0400
commit54a6eb5c4765aa573a030ceeba2c14e3d2ea5706 (patch)
tree547176a090beb787722a153cf2b8b942dc0e68db /arch/parisc/mm
parent18ea7e710d2452fa726814a406779188028cf1bf (diff)
mm: use two zonelist that are filtered by GFP mask
Currently a node has two sets of zonelists, one for each zone type in the system and a second set for GFP_THISNODE allocations. Based on the zones allowed by a gfp mask, one of these zonelists is selected. All of these zonelists consume memory and occupy cache lines. This patch replaces the multiple zonelists per-node with two zonelists. The first contains all populated zones in the system, ordered by distance, for fallback allocations when the target/preferred node has no free pages. The second contains all populated zones in the node suitable for GFP_THISNODE allocations. An iterator macro is introduced called for_each_zone_zonelist() that interates through each zone allowed by the GFP flags in the selected zonelist. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <clameter@sgi.com> Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/parisc/mm')
-rw-r--r--arch/parisc/mm/init.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index eb80f5e33d7d..9bb6136d77c2 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -603,15 +603,18 @@ void show_mem(void)
603#ifdef CONFIG_DISCONTIGMEM 603#ifdef CONFIG_DISCONTIGMEM
604 { 604 {
605 struct zonelist *zl; 605 struct zonelist *zl;
606 int i, j, k; 606 int i, j;
607 607
608 for (i = 0; i < npmem_ranges; i++) { 608 for (i = 0; i < npmem_ranges; i++) {
609 zl = node_zonelist(i);
609 for (j = 0; j < MAX_NR_ZONES; j++) { 610 for (j = 0; j < MAX_NR_ZONES; j++) {
610 zl = NODE_DATA(i)->node_zonelists + j; 611 struct zone **z;
612 struct zone *zone;
611 613
612 printk("Zone list for zone %d on node %d: ", j, i); 614 printk("Zone list for zone %d on node %d: ", j, i);
613 for (k = 0; zl->zones[k] != NULL; k++) 615 for_each_zone_zonelist(zone, z, zl, j)
614 printk("[%d/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name); 616 printk("[%d/%s] ", zone_to_nid(zone),
617 zone->name);
615 printk("\n"); 618 printk("\n");
616 } 619 }
617 } 620 }