Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-08 Thread Christoph Lameter
On Thu, 8 Feb 2007, Andrew Morton wrote: > > Surely your computer has some memory so attach it to that memory (which > > in a NUMA system would be one or the other node). > > "attach it". But it _isn't_ attached. There is no memory on this node. > We seem to be saying that we should misrepres

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-08 Thread Andrew Morton
On Thu, 8 Feb 2007 11:09:40 -0800 (PST) Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > > and to > > > > accurately present the machine's topology to the user without us having > > > > to > > > > go adding falsehoods like this? > > > > > > a node is a piece of memory. Without memory it does

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-08 Thread Christoph Lameter
On Wed, 7 Feb 2007, Andrew Morton wrote: > > > A node which has CPUs and no memory is obviously physically possible and > > > isn't a completely insane thing for a user to do. I'd have thought that > > > the kernel should be able to cleanly and clearly handle it, > > > > It doesn't. > > Fix it?

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-08 Thread Bob Picco
Hiroyuki KAMEZAWA wrote:[Wed Feb 07 2007, 03:36:47AM EST] > On Wed, 7 Feb 2007 00:04:41 -0800 (PST) > Christoph Lameter <[EMAIL PROTECTED]> wrote: > > > On Wed, 7 Feb 2007, KAMEZAWA Hiroyuki wrote: > > > > > > Hmmm... Remove the node from the node_online_map instead? > > > > > > > Changi

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 09:43:44 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > > > and to > > > accurately present the machine's topology to the user without us having to > > > go adding falsehoods like this? > > > > a node is a piece of memory. Without memory it doesn't make sense. > > Who said?

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andrew Morton
On Wed, 7 Feb 2007 17:50:55 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > On Wednesday 07 February 2007 17:23, Andrew Morton wrote: > > On 07 Feb 2007 11:20:06 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> writes: > > > > > > > current mempolicy just

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
On Wednesday 07 February 2007 17:23, Andrew Morton wrote: > On 07 Feb 2007 11:20:06 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> writes: > > > > > current mempolicy just checks whether a node is online or not. > > > If there is memory-less-node, mempolic

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andrew Morton
On 07 Feb 2007 11:20:06 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> writes: > > > current mempolicy just checks whether a node is online or not. > > If there is memory-less-node, mempolicy's target node can be > > invalid. > > This patch adds a check whethe

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 06:05:56 -0800 (PST) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Wed, 7 Feb 2007, KAMEZAWA Hiroyuki wrote: > > > > IMHO there shouldn't be any memory less nodes. The architecture code > > > should not create them. The CPU should be assigned to a nearby node > > > instead

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Christoph Lameter
On Wed, 7 Feb 2007, KAMEZAWA Hiroyuki wrote: > > IMHO there shouldn't be any memory less nodes. The architecture code > > should not create them. The CPU should be assigned to a nearby node instead. > > At least x86-64 ensures that. > > > AFAIK, ia64 creates nodes just depends on SRAT's possible

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Christoph Lameter
On Wed, 7 Feb 2007, Andi Kleen wrote: > IMHO there shouldn't be any memory less nodes. The architecture code > should not create them. The CPU should be assigned to a nearby node instead. > At least x86-64 ensures that. Yes I wish we would do it that way on all platforms. SGI's SN2 does that too

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 12:32:36 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > How for_each_online_node(nid) works ? it can handle alias-nid ? > > > > == > > for_each_online_node(nid) { > > pgdat = NODE_DATA(nid); > > == > > This code never accesses pgdat_for_A twice ? > > It wou

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
> How for_each_online_node(nid) works ? it can handle alias-nid ? > > == > for_each_online_node(nid) { > pgdat = NODE_DATA(nid); > == > This code never accesses pgdat_for_A twice ? It would. If there's a problem it could be changed to walk the pgdat lists instead, but at lea

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 11:41:25 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > On Wednesday 07 February 2007 11:37, KAMEZAWA Hiroyuki wrote: > > On Wed, 7 Feb 2007 11:19:02 +0100 > > Andi Kleen <[EMAIL PROTECTED]> wrote: > > > You can also alias node numbers to solve this: just point multiple node > >

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
On Wednesday 07 February 2007 11:37, KAMEZAWA Hiroyuki wrote: > On Wed, 7 Feb 2007 11:19:02 +0100 > Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > > AFAIK, ia64 creates nodes just depends on SRAT's possible resource > > > information. > > > Then, ia64 can create cpu-memory-less-node(node with n

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 11:19:02 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > AFAIK, ia64 creates nodes just depends on SRAT's possible resource > > information. > > Then, ia64 can create cpu-memory-less-node(node with no available > > resource.). > > (*)I don't like this. > > > > If we don't

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
> AFAIK, ia64 creates nodes just depends on SRAT's possible resource > information. > Then, ia64 can create cpu-memory-less-node(node with no available resource.). > (*)I don't like this. > > If we don't allow memory-less-node, we may have to add several codes for > cpu-hot-add. > cpus should b

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On 07 Feb 2007 11:20:06 +0100 Andi Kleen <[EMAIL PROTECTED]> wrote: > KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> writes: > > > current mempolicy just checks whether a node is online or not. > > If there is memory-less-node, mempolicy's target node can be > > invalid. > > This patch adds a check whethe

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
KAMEZAWA Hiroyuki <[EMAIL PROTECTED]> writes: > current mempolicy just checks whether a node is online or not. > If there is memory-less-node, mempolicy's target node can be > invalid. > This patch adds a check whether a node has memory or not. IMHO there shouldn't be any memory less nodes. The a

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Andi Kleen
Christoph Lameter <[EMAIL PROTECTED]> writes: > > Would it be possible to attach the cpus to the > next nodes with memory and mark the node offline? That way we could avoid > another mask that we constantly have to check? That is what x86-64 does and I believe is the right solution to this. -A

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread KAMEZAWA Hiroyuki
On Wed, 7 Feb 2007 00:04:41 -0800 (PST) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Wed, 7 Feb 2007, KAMEZAWA Hiroyuki wrote: > > > > Hmmm... Remove the node from the node_online_map instead? > > > > > Changing defintion of node_online_map is harmfil. (there are > > cpu-only-nodes.) > > H

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-07 Thread Christoph Lameter
On Wed, 7 Feb 2007, KAMEZAWA Hiroyuki wrote: > > Hmmm... Remove the node from the node_online_map instead? > > > Changing defintion of node_online_map is harmfil. (there are cpu-only-nodes.) > How about adding nodemask for nodes equips memory ? Ok that is better but... Would it be possible to

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-06 Thread KAMEZAWA Hiroyuki
On Tue, 6 Feb 2007 09:26:53 -0800 (PST) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Tue, 6 Feb 2007, KAMEZAWA Hiroyuki wrote: > > > This means an access to NULL,here. > > == > > unsigned slab_node(struct mempolicy *policy) > > { > > case MPOL_BIND: > > /* > >

Re: [2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-06 Thread Christoph Lameter
On Tue, 6 Feb 2007, KAMEZAWA Hiroyuki wrote: > This means an access to NULL,here. > == > unsigned slab_node(struct mempolicy *policy) > { > case MPOL_BIND: > /* > * Follow bind policy behavior and start allocation at the > * first node. >

[2.6.20][PATCH] fix mempolicy error check on a system with memory-less-node

2007-02-06 Thread KAMEZAWA Hiroyuki
current mempolicy just checks whether a node is online or not. If there is memory-less-node, mempolicy's target node can be invalid. This patch adds a check whether a node has memory or not. This is an back-trace in which a program uses MPOL_MBIND just includes memory-less-node. == backtrace from