From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 11 Jul 2007 16:48:11 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [patch 10/12] Memoryless nodes: Update memory policy and page migration Message-Id: <20070711164811.e94df898.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20070710215456.394842768@sgi.com> References: <20070710215339.110895755@sgi.com> <20070710215456.394842768@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: akpm@linux-foundation.org, kxr@sgi.com, Nishanth Aravamudan , linux-mm@kvack.org, Lee Schermerhorn List-ID: On Tue, 10 Jul 2007 14:52:15 -0700 Christoph Lameter wrote: > + *nodes = node_memory_map; > else node_states[N_MEMORY] ? > check_pgd_range(vma, vma->vm_start, vma->vm_end, > - &node_online_map, MPOL_MF_STATS, md); > + &node_memory_map, MPOL_MF_STATS, md); > } Again here. -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 11 Jul 2007 17:06:39 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [patch 11/12] Memoryless nodes: Fix GFP_THISNODE behavior Message-Id: <20070711170639.51ebb2d8.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20070710215456.642568985@sgi.com> References: <20070710215339.110895755@sgi.com> <20070710215456.642568985@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: akpm@linux-foundation.org, kxr@sgi.com, Nishanth Aravamudan , linux-mm@kvack.org, Lee Schermerhorn List-ID: some nitpicks... On Tue, 10 Jul 2007 14:52:16 -0700 Christoph Lameter wrote: > +static void build_thisnode_zonelists(pg_data_t *pgdat) > +{ > + enum zone_type i; > + int j; > + struct zonelist *zonelist; > + > + for (i = 0; i < MAX_NR_ZONES; i++) { > + zonelist = pgdat->node_zonelists + MAX_NR_ZONES + i; > + j = build_zonelists_node(pgdat, zonelist, 0, i); > + zonelist->zones[j] = NULL; > + } > +} adding explanation as following is maybe good. == /* * NUMA default zonelist is structured as * [0....MAX_NR_ZONES) : allows fallbacks to other node for each GFP_MASK. * [MAX_NR_ZONES...MAX_ZONELISTS) : disallow fallbacks for GFP_XXX |GFP_THISNODE */ == > + > +/* > * Build zonelists ordered by zone and nodes within zones. > * This results in conserving DMA zone[s] until all Normal memory is > * exhausted, but results in overflowing to remote node while memory > @@ -2267,7 +2283,7 @@ static void build_zonelists(pg_data_t *p > int order = current_zonelist_order; > > /* initialize zonelists */ > - for (i = 0; i < MAX_NR_ZONES; i++) { > + for (i = 0; i < 2 * MAX_NR_ZONES; i++) { please use MAX_ZONELISTS here. -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <469496D8.6040802@sgi.com> Date: Wed, 11 Jul 2007 10:37:44 +0200 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [patch 08/12] Uncached allocator: Handle memoryless nodes References: <20070710215339.110895755@sgi.com> <20070710215455.870757833@sgi.com> In-Reply-To: <20070710215455.870757833@sgi.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: akpm@linux-foundation.org, kxr@sgi.com, linux-mm@kvack.org, Nishanth Aravamudan , Lee Schermerhorn List-ID: Christoph Lameter wrote: > The checks for node_online in the uncached allocator are made to make sure > that memory is available on these nodes. Thus switch all the checks to use > the node_memory and for_each_memory_node functions. > > Cc: jes@sgi.com > Signed-off-by: Christoph Lameter I'm fine with this: Signed-off-by: Jes Sorensen Jes > --- > arch/ia64/kernel/uncached.c | 4 ++-- > drivers/char/mspec.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > Index: linux-2.6.22-rc6-mm1/arch/ia64/kernel/uncached.c > =================================================================== > --- linux-2.6.22-rc6-mm1.orig/arch/ia64/kernel/uncached.c 2007-06-24 16:21:48.000000000 -0700 > +++ linux-2.6.22-rc6-mm1/arch/ia64/kernel/uncached.c 2007-07-09 22:24:42.000000000 -0700 > @@ -196,7 +196,7 @@ unsigned long uncached_alloc_page(int st > nid = starting_nid; > > do { > - if (!node_online(nid)) > + if (!node_state(nid, N_MEMORY)) > continue; > uc_pool = &uncached_pools[nid]; > if (uc_pool->pool == NULL) > @@ -268,7 +268,7 @@ static int __init uncached_init(void) > { > int nid; > > - for_each_online_node(nid) { > + for_each_node_state(nid, N_ONLINE) { > uncached_pools[nid].pool = gen_pool_create(PAGE_SHIFT, nid); > mutex_init(&uncached_pools[nid].add_chunk_mutex); > } > Index: linux-2.6.22-rc6-mm1/drivers/char/mspec.c > =================================================================== > --- linux-2.6.22-rc6-mm1.orig/drivers/char/mspec.c 2007-07-03 17:19:24.000000000 -0700 > +++ linux-2.6.22-rc6-mm1/drivers/char/mspec.c 2007-07-09 22:24:42.000000000 -0700 > @@ -353,7 +353,7 @@ mspec_init(void) > is_sn2 = 1; > if (is_shub2()) { > ret = -ENOMEM; > - for_each_online_node(nid) { > + for_each_node_state(nid, N_ONLINE) { > int actual_nid; > int nasid; > unsigned long phys; > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l6BGGtD6028680 for ; Wed, 11 Jul 2007 12:16:55 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l6BGGscJ551304 for ; Wed, 11 Jul 2007 12:16:54 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6BGGsJk002099 for ; Wed, 11 Jul 2007 12:16:54 -0400 Date: Wed, 11 Jul 2007 09:16:53 -0700 From: Nishanth Aravamudan Subject: Re: [patch 10/12] Memoryless nodes: Update memory policy and page migration Message-ID: <20070711161653.GN27655@us.ibm.com> References: <20070710215339.110895755@sgi.com> <20070710215456.394842768@sgi.com> <20070711164811.e94df898.kamezawa.hiroyu@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070711164811.e94df898.kamezawa.hiroyu@jp.fujitsu.com> Sender: owner-linux-mm@kvack.org Return-Path: To: KAMEZAWA Hiroyuki Cc: Christoph Lameter , akpm@linux-foundation.org, kxr@sgi.com, linux-mm@kvack.org, Lee Schermerhorn List-ID: On 11.07.2007 [16:48:11 +0900], KAMEZAWA Hiroyuki wrote: > On Tue, 10 Jul 2007 14:52:15 -0700 > Christoph Lameter wrote: > > > + *nodes = node_memory_map; > > else > node_states[N_MEMORY] ? > > > > check_pgd_range(vma, vma->vm_start, vma->vm_end, > > - &node_online_map, MPOL_MF_STATS, md); > > + &node_memory_map, MPOL_MF_STATS, md); > > } > > Again here. I think Christoph missed a hunk in the node_memory_map patch, which would #define node_memory_map node_stats[N_MEMORY] Thanks, Nish -- Nishanth Aravamudan IBM Linux Technology Center -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e2.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l6BGHlal021185 for ; Wed, 11 Jul 2007 12:17:47 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l6BGHla4543724 for ; Wed, 11 Jul 2007 12:17:47 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6BGHkIZ005954 for ; Wed, 11 Jul 2007 12:17:46 -0400 Date: Wed, 11 Jul 2007 09:17:42 -0700 From: Nishanth Aravamudan Subject: Re: [patch 02/12] NUMA: Introduce node_memory_map Message-ID: <20070711161742.GO27655@us.ibm.com> References: <20070710215339.110895755@sgi.com> <20070710215454.355598739@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070710215454.355598739@sgi.com> Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: akpm@linux-foundation.org, kxr@sgi.com, Lee Schermerhorn , linux-mm@kvack.org List-ID: On 10.07.2007 [14:52:07 -0700], Christoph Lameter wrote: > It is necessary to know if nodes have memory since we have recently > begun to add support for memoryless nodes. For that purpose we introduce > a new node state N_MEMORY. > > A node has its bit in node_memory_map set if it has memory. If a node > has memory then it has at least one zone defined in its pgdat structure > that is located in the pgdat itself. Uh, except node_memory_map is not defined below. I'm guessing you just need #define node_memory_map node_states[N_MEMORY] below. Thanks, Nish > N_MEMORY can then be used in various places to insure that we > do the right thing when we encounter a memoryless node. > > Signed-off-by: Lee Schermerhorn > Signed-off-by: Nishanth Aravamudan > Signed-off-by: Christoph Lameter > > --- > include/linux/nodemask.h | 1 + > mm/page_alloc.c | 9 +++++++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > Index: linux-2.6.22-rc6-mm1/include/linux/nodemask.h > =================================================================== > --- linux-2.6.22-rc6-mm1.orig/include/linux/nodemask.h 2007-07-09 22:13:44.000000000 -0700 > +++ linux-2.6.22-rc6-mm1/include/linux/nodemask.h 2007-07-09 22:16:05.000000000 -0700 > @@ -343,6 +343,7 @@ static inline void __nodes_remap(nodemas > enum node_states { > N_POSSIBLE, /* The node could become online at some point */ > N_ONLINE, /* The node is online */ > + N_MEMORY, /* The node has memory */ > NR_NODE_STATES > }; > > Index: linux-2.6.22-rc6-mm1/mm/page_alloc.c > =================================================================== > --- linux-2.6.22-rc6-mm1.orig/mm/page_alloc.c 2007-07-09 22:15:45.000000000 -0700 > +++ linux-2.6.22-rc6-mm1/mm/page_alloc.c 2007-07-09 22:19:28.000000000 -0700 > @@ -2392,8 +2392,13 @@ static int __build_all_zonelists(void *d > int nid; > > for_each_online_node(nid) { > - build_zonelists(NODE_DATA(nid)); > - build_zonelist_cache(NODE_DATA(nid)); > + pg_data_t *pgdat = NODE_DATA(nid); > + > + build_zonelists(pgdat); > + build_zonelist_cache(pgdat); > + > + if (pgdat->node_present_pages) > + node_set_state(nid, N_MEMORY); > } > return 0; > } > > -- -- Nishanth Aravamudan IBM Linux Technology Center -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e33.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id l6BGuau3025321 for ; Wed, 11 Jul 2007 12:56:36 -0400 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l6BGuCRE126542 for ; Wed, 11 Jul 2007 10:56:35 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l6BGb16k023708 for ; Wed, 11 Jul 2007 10:37:01 -0600 Date: Wed, 11 Jul 2007 09:37:00 -0700 From: Nishanth Aravamudan Subject: Re: [patch 10/12] Memoryless nodes: Update memory policy and page migration Message-ID: <20070711163700.GP27655@us.ibm.com> References: <20070710215339.110895755@sgi.com> <20070710215456.394842768@sgi.com> <20070711164811.e94df898.kamezawa.hiroyu@jp.fujitsu.com> <20070711161653.GN27655@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070711161653.GN27655@us.ibm.com> Sender: owner-linux-mm@kvack.org Return-Path: To: KAMEZAWA Hiroyuki Cc: Christoph Lameter , akpm@linux-foundation.org, kxr@sgi.com, linux-mm@kvack.org, Lee Schermerhorn List-ID: On 11.07.2007 [09:16:53 -0700], Nishanth Aravamudan wrote: > On 11.07.2007 [16:48:11 +0900], KAMEZAWA Hiroyuki wrote: > > On Tue, 10 Jul 2007 14:52:15 -0700 > > Christoph Lameter wrote: > > > > > + *nodes = node_memory_map; > > > else > > node_states[N_MEMORY] ? > > > > > > > check_pgd_range(vma, vma->vm_start, vma->vm_end, > > > - &node_online_map, MPOL_MF_STATS, md); > > > + &node_memory_map, MPOL_MF_STATS, md); > > > } > > > > Again here. > > I think Christoph missed a hunk in the node_memory_map patch, which > would > > #define node_memory_map node_stats[N_MEMORY] Or maybe it's intentional -- and your changes are appropriate (and in-line with the other changes Christoph's patches made). Thanks, Nish -- Nishanth Aravamudan IBM Linux Technology Center -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 11 Jul 2007 10:35:45 -0700 (PDT) From: Christoph Lameter Subject: Re: [patch 10/12] Memoryless nodes: Update memory policy and page migration In-Reply-To: <20070711161653.GN27655@us.ibm.com> Message-ID: References: <20070710215339.110895755@sgi.com> <20070710215456.394842768@sgi.com> <20070711164811.e94df898.kamezawa.hiroyu@jp.fujitsu.com> <20070711161653.GN27655@us.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Nishanth Aravamudan Cc: KAMEZAWA Hiroyuki , akpm@linux-foundation.org, kxr@sgi.com, linux-mm@kvack.org, Lee Schermerhorn List-ID: On Wed, 11 Jul 2007, Nishanth Aravamudan wrote: > I think Christoph missed a hunk in the node_memory_map patch, which > would > > #define node_memory_map node_stats[N_MEMORY] No. Somehow the patch was not updated. Need to send out a new rev. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 11 Jul 2007 10:45:37 -0700 (PDT) From: Christoph Lameter Subject: Re: [patch 11/12] Memoryless nodes: Fix GFP_THISNODE behavior In-Reply-To: <20070711170639.51ebb2d8.kamezawa.hiroyu@jp.fujitsu.com> Message-ID: References: <20070710215339.110895755@sgi.com> <20070710215456.642568985@sgi.com> <20070711170639.51ebb2d8.kamezawa.hiroyu@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: KAMEZAWA Hiroyuki Cc: akpm@linux-foundation.org, kxr@sgi.com, Nishanth Aravamudan , linux-mm@kvack.org, Lee Schermerhorn List-ID: On Wed, 11 Jul 2007, KAMEZAWA Hiroyuki wrote: > > + struct zonelist *zonelist; > > + > > + for (i = 0; i < MAX_NR_ZONES; i++) { > > + zonelist = pgdat->node_zonelists + MAX_NR_ZONES + i; > > + j = build_zonelists_node(pgdat, zonelist, 0, i); > > + zonelist->zones[j] = NULL; > > + } > > +} > adding explanation as following is maybe good. > == > /* > * NUMA default zonelist is structured as > * [0....MAX_NR_ZONES) : allows fallbacks to other node for each GFP_MASK. > * [MAX_NR_ZONES...MAX_ZONELISTS) : disallow fallbacks for GFP_XXX |GFP_THISNODE > */ > == Will add this. > > + > > +/* > > * Build zonelists ordered by zone and nodes within zones. > > * This results in conserving DMA zone[s] until all Normal memory is > > * exhausted, but results in overflowing to remote node while memory > > @@ -2267,7 +2283,7 @@ static void build_zonelists(pg_data_t *p > > int order = current_zonelist_order; > > > > /* initialize zonelists */ > > - for (i = 0; i < MAX_NR_ZONES; i++) { > > + for (i = 0; i < 2 * MAX_NR_ZONES; i++) { > > please use MAX_ZONELISTS here. Right. Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org