summaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2006-09-27 01:50:08 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-27 08:26:13 -0700
commitd5f541ed6e31518508c688912e7464facf253c87 (patch)
tree028d296306e247ca32ec5db398d365dcd70d26b7 /include/linux/mm.h
parent765c4507af71c39aba21006bbd3ec809fe9714ff (diff)
downloadop-kernel-dev-d5f541ed6e31518508c688912e7464facf253c87.zip
op-kernel-dev-d5f541ed6e31518508c688912e7464facf253c87.tar.gz
[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>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 7477fb5..8e433bb 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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)
OpenPOWER on IntegriCloud