All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: akpm@linux-foundation.org, kxr@sgi.com,
	Lee Schermerhorn <Lee.Schermerhorn@hp.com>,
	linux-mm@kvack.org
Subject: Re: [patch 02/12] NUMA: Introduce node_memory_map
Date: Wed, 11 Jul 2007 09:17:42 -0700	[thread overview]
Message-ID: <20070711161742.GO27655@us.ibm.com> (raw)
In-Reply-To: <20070710215454.355598739@sgi.com>

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 <Lee.Schermerhorn@hp.com>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
> 
> ---
>  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 <nacc@us.ibm.com>
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      parent reply	other threads:[~2007-07-11 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070710215339.110895755@sgi.com>
     [not found] ` <20070710215456.394842768@sgi.com>
2007-07-11  7:48   ` [patch 10/12] Memoryless nodes: Update memory policy and page migration KAMEZAWA Hiroyuki
2007-07-11 16:16     ` Nishanth Aravamudan
2007-07-11 16:37       ` Nishanth Aravamudan
2007-07-11 17:35       ` Christoph Lameter
     [not found] ` <20070710215456.642568985@sgi.com>
2007-07-11  8:06   ` [patch 11/12] Memoryless nodes: Fix GFP_THISNODE behavior KAMEZAWA Hiroyuki
2007-07-11 17:45     ` Christoph Lameter
     [not found] ` <20070710215455.870757833@sgi.com>
2007-07-11  8:37   ` [patch 08/12] Uncached allocator: Handle memoryless nodes Jes Sorensen
     [not found] ` <20070710215454.355598739@sgi.com>
2007-07-11 16:17   ` Nishanth Aravamudan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070711161742.GO27655@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=kxr@sgi.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.