[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>
This commit is contained in:
committed by
Linus Torvalds
parent
4415cc8df6
commit
89fa30242f
@@ -551,7 +551,7 @@ void show_mem(void)
|
||||
|
||||
printk("Zone list for zone %d on node %d: ", j, i);
|
||||
for (k = 0; zl->zones[k] != NULL; k++)
|
||||
printk("[%d/%s] ", zl->zones[k]->zone_pgdat->node_id, zl->zones[k]->name);
|
||||
printk("[%d/%s] ", zone_to_nid(zl->zones[k]), zl->zones[k]->name);
|
||||
printk("\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user