[PATCH] Add node to zone for the NUMA case

Add the node in order to optimize zone_to_nid.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Christoph Lameter 2006-09-27 01:50:08 -07:00 committed by Linus Torvalds
parent 765c4507af
commit d5f541ed6e
3 changed files with 7 additions and 1 deletions

View file

@ -446,7 +446,11 @@ static inline struct zone *page_zone(struct page *page)
static inline unsigned long zone_to_nid(struct zone *zone)
{
return zone->zone_pgdat->node_id;
#ifdef CONFIG_NUMA
return zone->node;
#else
return 0;
#endif
}
static inline unsigned long page_to_nid(struct page *page)