From e8006a9c3f428a47f92190ae9d47db1c219c9ed2 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Wed, 27 Sep 2006 01:50:08 -0700 Subject: [PATCH] --- yaml --- r: 36153 b: refs/heads/master c: d5f541ed6e31518508c688912e7464facf253c87 h: refs/heads/master i: 36151: a2161c9080de3b0b45d8f03823fa46052fae38bc v: v3 --- [refs] | 2 +- trunk/include/linux/mm.h | 6 +++++- trunk/include/linux/mmzone.h | 1 + trunk/mm/page_alloc.c | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b6c29c519b6c..bc12e4a06b72 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 765c4507af71c39aba21006bbd3ec809fe9714ff +refs/heads/master: d5f541ed6e31518508c688912e7464facf253c87 diff --git a/trunk/include/linux/mm.h b/trunk/include/linux/mm.h index 7477fb59c4f2..8e433bbc6e7e 100644 --- a/trunk/include/linux/mm.h +++ b/trunk/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) diff --git a/trunk/include/linux/mmzone.h b/trunk/include/linux/mmzone.h index 562cf7a8f3ee..59855b8718a0 100644 --- a/trunk/include/linux/mmzone.h +++ b/trunk/include/linux/mmzone.h @@ -168,6 +168,7 @@ struct zone { unsigned long lowmem_reserve[MAX_NR_ZONES]; #ifdef CONFIG_NUMA + int node; /* * zone reclaim becomes active if more unmapped pages exist. */ diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index 4c76188b1681..d0432e44f77d 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -2405,6 +2405,7 @@ static void __meminit free_area_init_core(struct pglist_data *pgdat, zone->spanned_pages = size; zone->present_pages = realsize; #ifdef CONFIG_NUMA + zone->node = nid; zone->min_unmapped_pages = (realsize*sysctl_min_unmapped_ratio) / 100; zone->min_slab_pages = (realsize * sysctl_min_slab_ratio) / 100;