diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-09-26 02:31:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-26 11:48:52 -0400 |
commit | 89fa30242facca249aead2aac03c4c69764f911c (patch) | |
tree | 1ac46b4777b819f2a4793d8e37330576ae5089ec /arch | |
parent | 4415cc8df630b05d3a54267d5f3e5c0b63a4ec05 (diff) |
[PATCH] NUMA: Add zone_to_nid function
There are many places where we need to determine the node of a zone.
Currently we use a difficult to read sequence of pointer dereferencing.
Put that into an inline function and use throughout VM. Maybe we can find
a way to optimize the lookup in the future.
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 'arch')
-rw-r--r-- | arch/i386/mm/discontig.c | 2 | ||||
-rw-r--r-- | arch/parisc/mm/init.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c index 07c300f93764..fb5d8b747de4 100644 --- a/arch/i386/mm/discontig.c +++ b/arch/i386/mm/discontig.c | |||
@@ -422,7 +422,7 @@ void __init set_highmem_pages_init(int bad_ppro) | |||
422 | zone_end_pfn = zone_start_pfn + zone->spanned_pages; | 422 | zone_end_pfn = zone_start_pfn + zone->spanned_pages; |
423 | 423 | ||
424 | printk("Initializing %s for node %d (%08lx:%08lx)\n", | 424 | printk("Initializing %s for node %d (%08lx:%08lx)\n", |
425 | zone->name, zone->zone_pgdat->node_id, | 425 | zone->name, zone_to_nid(zone), |
426 | zone_start_pfn, zone_end_pfn); | 426 | zone_start_pfn, zone_end_pfn); |
427 | 427 | ||
428 | for (node_pfn = zone_start_pfn; node_pfn < zone_end_pfn; node_pfn++) { | 428 | for (node_pfn = zone_start_pfn; node_pfn < zone_end_pfn; node_pfn++) { |
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index c7329615ef94..25ad28d63e88 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c | |||
@@ -551,7 +551,7 @@ void show_mem(void) | |||
551 | 551 | ||
552 | printk("Zone list for zone %d on node %d: ", j, i); | 552 | printk("Zone list for zone %d on node %d: ", j, i); |
553 | for (k = 0; zl->zones[k] != NULL; k++) | 553 | for (k = 0; zl->zones[k] != NULL; k++) |
554 | printk("[%d/%s] ", zl->zones[k]->zone_pgdat->node_id, zl->zones[k]->name); | 554 | printk("[%d/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name); |
555 | printk("\n"); | 555 | printk("\n"); |
556 | } | 556 | } |
557 | } | 557 | } |