* Re: [patch 01/12] NUMA: Generic management of nodemasks for various purposes
2007-07-11 19:06 ` [patch 01/12] NUMA: Generic management of nodemasks for various purposes Christoph Lameter
@ 2007-07-11 19:32 ` Lee Schermerhorn
2007-07-20 20:49 ` [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation Lee Schermerhorn
` (3 subsequent siblings)
4 siblings, 0 replies; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-11 19:32 UTC (permalink / raw)
To: Christoph Lameter
Cc: akpm, kxr, linux-mm, Nishanth Aravamudan, KAMEZAWA Hiroyuki
On Wed, 2007-07-11 at 12:06 -0700, Christoph Lameter wrote:
> On Wed, 11 Jul 2007, Christoph Lameter wrote:
>
> > -EXPORT_SYMBOL(node_possible_map);
> > +nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
> > + [N_POSSIBLE] => NODE_MASK_ALL,
> > + [N_ONLINE] =>{ { [0] = 1UL } }
> > +};
> > +EXPORT_SYMBOL(node_states);
>
> Crap here too. I desperately need a vacation. Next week....
Hi, Christoph.
I've grabbed your patch set [trying to keep track of updates ;-)]. I'll
test on various platforms here over the next couple of days and let you
know what I find.
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-11 19:06 ` [patch 01/12] NUMA: Generic management of nodemasks for various purposes Christoph Lameter
2007-07-11 19:32 ` Lee Schermerhorn
@ 2007-07-20 20:49 ` Lee Schermerhorn
2007-07-20 22:07 ` Nishanth Aravamudan
2007-07-23 19:09 ` Nishanth Aravamudan
2007-07-24 14:15 ` [PATCH take2] " Lee Schermerhorn
` (2 subsequent siblings)
4 siblings, 2 replies; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-20 20:49 UTC (permalink / raw)
To: Christoph Lameter, Paul Jackson
Cc: akpm, kxr, linux-mm, Nishanth Aravamudan, KAMEZAWA Hiroyuki
This fixes a problem I encountered testing Christoph's memoryless nodes
series. Applies atop that series. Other than this, series holds up
under what testing I've been able to do this week.
Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
cpusets try to ensure that any node added to a cpuset's
mems_allowed is on-line and contains memory. The assumption
was that online nodes contained memory. Thus, it is possible
to add memoryless nodes to a cpuset and then add tasks to this
cpuset. This results in continuous series of oom-kill and other
console stack traces and apparent system hang.
Change cpusets to use node_states[N_MEMORY] [a.k.a.
node_memory_map] in place of node_online_map when vetting
memories. Return error if admin attempts to write a non-empty
mems_allowed node mask containing only memoryless-nodes.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
kernel/cpuset.c | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
Index: Linux/kernel/cpuset.c
===================================================================
--- Linux.orig/kernel/cpuset.c 2007-07-20 16:02:01.000000000 -0400
+++ Linux/kernel/cpuset.c 2007-07-20 16:27:46.000000000 -0400
@@ -316,26 +316,26 @@ static void guarantee_online_cpus(const
/*
* Return in *pmask the portion of a cpusets's mems_allowed that
- * are online. If none are online, walk up the cpuset hierarchy
- * until we find one that does have some online mems. If we get
- * all the way to the top and still haven't found any online mems,
- * return node_online_map.
+ * are online, with memory. If none are online with memory, walk
+ * up the cpuset hierarchy until we find one that does have some
+ * online mems. If we get all the way to the top and still haven't
+ * found any online mems, return node_states[N_MEMORY].
*
* One way or another, we guarantee to return some non-empty subset
- * of node_online_map.
+ * of node_states[N_MEMORY].
*
* Call with callback_mutex held.
*/
static void guarantee_online_mems(const struct cpuset *cs, nodemask_t *pmask)
{
- while (cs && !nodes_intersects(cs->mems_allowed, node_online_map))
+ while (cs && !nodes_intersects(cs->mems_allowed, node_states[N_MEMORY]))
cs = cs->parent;
if (cs)
- nodes_and(*pmask, cs->mems_allowed, node_online_map);
+ nodes_and(*pmask, cs->mems_allowed, node_states[N_MEMORY]);
else
- *pmask = node_online_map;
- BUG_ON(!nodes_intersects(*pmask, node_online_map));
+ *pmask = node_states[N_MEMORY];
+ BUG_ON(!nodes_intersects(*pmask, node_states[N_MEMORY]));
}
/**
@@ -623,8 +623,21 @@ static int update_nodemask(struct cpuset
retval = nodelist_parse(buf, trialcs.mems_allowed);
if (retval < 0)
goto done;
+ if (!nodes_intersects(trialcs.mems_allowed,
+ node_states[N_MEMORY])) {
+ /*
+ * error if only memoryless nodes specified.
+ */
+ retval = -ENOSPC;
+ goto done;
+ }
}
- nodes_and(trialcs.mems_allowed, trialcs.mems_allowed, node_online_map);
+ /*
+ * Exclude memoryless nodes. We know that trialcs.mems_allowed
+ * contains at least one node with memory.
+ */
+ nodes_and(trialcs.mems_allowed, trialcs.mems_allowed,
+ node_states[N_MEMORY]);
oldmem = cs->mems_allowed;
if (nodes_equal(oldmem, trialcs.mems_allowed)) {
retval = 0; /* Too easy - nothing to do */
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-20 20:49 ` [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation Lee Schermerhorn
@ 2007-07-20 22:07 ` Nishanth Aravamudan
2007-07-23 19:09 ` Nishanth Aravamudan
1 sibling, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-20 22:07 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> This fixes a problem I encountered testing Christoph's memoryless nodes
> series. Applies atop that series. Other than this, series holds up
> under what testing I've been able to do this week.
>
> Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
>
> cpusets try to ensure that any node added to a cpuset's
> mems_allowed is on-line and contains memory. The assumption
> was that online nodes contained memory. Thus, it is possible
> to add memoryless nodes to a cpuset and then add tasks to this
> cpuset. This results in continuous series of oom-kill and other
> console stack traces and apparent system hang.
>
> Change cpusets to use node_states[N_MEMORY] [a.k.a.
> node_memory_map] in place of node_online_map when vetting
> memories. Return error if admin attempts to write a non-empty
> mems_allowed node mask containing only memoryless-nodes.
Yep, in cursorily looking at the hugetlb pool growing with cpusets (more
specifically at cpuset.c), I was thinking this would be necessary.
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-20 20:49 ` [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation Lee Schermerhorn
2007-07-20 22:07 ` Nishanth Aravamudan
@ 2007-07-23 19:09 ` Nishanth Aravamudan
2007-07-23 19:23 ` Paul Jackson
2007-07-23 20:59 ` Lee Schermerhorn
1 sibling, 2 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-23 19:09 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> This fixes a problem I encountered testing Christoph's memoryless nodes
> series. Applies atop that series. Other than this, series holds up
> under what testing I've been able to do this week.
>
> Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
>
> cpusets try to ensure that any node added to a cpuset's
> mems_allowed is on-line and contains memory. The assumption
> was that online nodes contained memory. Thus, it is possible
> to add memoryless nodes to a cpuset and then add tasks to this
> cpuset. This results in continuous series of oom-kill and other
> console stack traces and apparent system hang.
>
> Change cpusets to use node_states[N_MEMORY] [a.k.a.
> node_memory_map] in place of node_online_map when vetting
> memories. Return error if admin attempts to write a non-empty
> mems_allowed node mask containing only memoryless-nodes.
>
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Lee, while looking at this change, I think it ends up fixing
cpuset_mems_allowed() to return nodemasks that only include nodes in
node_states[N_MEMORY]. However, cpuset_current_mems_allowed is a
lockless macro which would still be broken. I think it would need to
becom a static inline nodes_and() in the CPUSET case and a #define
node_states[N_MEMORY] in the non-CPUSET case?
Or perhaps we should adjust cpusets to make it so that the mems_allowed
member only includes nodes that are set in node_states[N_MEMORY]?
What do you think? Paul?
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-23 19:09 ` Nishanth Aravamudan
@ 2007-07-23 19:23 ` Paul Jackson
2007-07-23 20:08 ` Nishanth Aravamudan
2007-07-23 20:59 ` Lee Schermerhorn
1 sibling, 1 reply; 48+ messages in thread
From: Paul Jackson @ 2007-07-23 19:23 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Lee.Schermerhorn, clameter, akpm, kxr, linux-mm, kamezawa.hiroyu
> Or perhaps we should adjust cpusets to make it so that the mems_allowed
> member only includes nodes that are set in node_states[N_MEMORY]?
>
> What do you think? Paul?
Do you mean the "mems_alloed member" of the task struct ?
That might make sense - changing task->mems_allowed to just include nodes
with memory.
Someone would have to audit the entire kernel for uses of task->mems_allowed,
to see if all uses would be ok with this change.
I'm on vacation this week and next, so won't be doing that work right now.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-23 19:23 ` Paul Jackson
@ 2007-07-23 20:08 ` Nishanth Aravamudan
0 siblings, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-23 20:08 UTC (permalink / raw)
To: Paul Jackson
Cc: Lee.Schermerhorn, clameter, akpm, kxr, linux-mm, kamezawa.hiroyu
On 23.07.2007 [12:23:33 -0700], Paul Jackson wrote:
> > Or perhaps we should adjust cpusets to make it so that the mems_allowed
> > member only includes nodes that are set in node_states[N_MEMORY]?
> >
> > What do you think? Paul?
>
> Do you mean the "mems_alloed member" of the task struct ?
I guess both that of the task_struct and that of the cpuset? I'm not
sure. Could we do it for both?
> That might make sense - changing task->mems_allowed to just include
> nodes with memory.
Yep.
> Someone would have to audit the entire kernel for uses of
> task->mems_allowed, to see if all uses would be ok with this change.
I am starting that now -- I'm first looking at every place (in -mm,
admittedly) that mems_allowed is assigned. Since now it's possible that
we'll have to do extra checking if some sort of rebinding to memoryless
nodes would occur (which we currently wouldn't even notice, AFAICT).
> I'm on vacation this week and next, so won't be doing that work right
> now.
Ok, thanks for taking the time to reply! I will try and spin something
up for you to review when you're back from vacation.
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-23 19:09 ` Nishanth Aravamudan
2007-07-23 19:23 ` Paul Jackson
@ 2007-07-23 20:59 ` Lee Schermerhorn
2007-07-23 21:48 ` Nishanth Aravamudan
1 sibling, 1 reply; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-23 20:59 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On Mon, 2007-07-23 at 12:09 -0700, Nishanth Aravamudan wrote:
> On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> > This fixes a problem I encountered testing Christoph's memoryless nodes
> > series. Applies atop that series. Other than this, series holds up
> > under what testing I've been able to do this week.
> >
> > Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
> >
> > cpusets try to ensure that any node added to a cpuset's
> > mems_allowed is on-line and contains memory. The assumption
> > was that online nodes contained memory. Thus, it is possible
> > to add memoryless nodes to a cpuset and then add tasks to this
> > cpuset. This results in continuous series of oom-kill and other
> > console stack traces and apparent system hang.
> >
> > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > node_memory_map] in place of node_online_map when vetting
> > memories. Return error if admin attempts to write a non-empty
> > mems_allowed node mask containing only memoryless-nodes.
> >
> > Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
>
> Lee, while looking at this change, I think it ends up fixing
> cpuset_mems_allowed() to return nodemasks that only include nodes in
> node_states[N_MEMORY]. However, cpuset_current_mems_allowed is a
> lockless macro which would still be broken. I think it would need to
> becom a static inline nodes_and() in the CPUSET case and a #define
> node_states[N_MEMORY] in the non-CPUSET case?
>
> Or perhaps we should adjust cpusets to make it so that the mems_allowed
> member only includes nodes that are set in node_states[N_MEMORY]?
I thought that's what my patch to nodelist_parse() did. It ensures that
current->mems_allowed is correct [contains at least one node with
memory, and only nodes with memory] at the time it is installed, but
doesn't consider memory hot plug and node off-lining. Is this
[offline/hotplug] your point?
Seems like that is an issue that exists in the unpatched code as
well--i.e., unlike cpuset_mems_allowed(), the lockless, "_current_"
version does not vet current->mems_allowed against the
nodes_online_mask. So, all valid nodes in current->mems_allowed could
have been off-lined since the mask was installed. Am I reading this
right?
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-23 20:59 ` Lee Schermerhorn
@ 2007-07-23 21:48 ` Nishanth Aravamudan
2007-07-24 14:11 ` Lee Schermerhorn
0 siblings, 1 reply; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-23 21:48 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 23.07.2007 [16:59:52 -0400], Lee Schermerhorn wrote:
> On Mon, 2007-07-23 at 12:09 -0700, Nishanth Aravamudan wrote:
> > On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> > > This fixes a problem I encountered testing Christoph's memoryless nodes
> > > series. Applies atop that series. Other than this, series holds up
> > > under what testing I've been able to do this week.
> > >
> > > Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
> > >
> > > cpusets try to ensure that any node added to a cpuset's
> > > mems_allowed is on-line and contains memory. The assumption
> > > was that online nodes contained memory. Thus, it is possible
> > > to add memoryless nodes to a cpuset and then add tasks to this
> > > cpuset. This results in continuous series of oom-kill and other
> > > console stack traces and apparent system hang.
> > >
> > > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > > node_memory_map] in place of node_online_map when vetting
> > > memories. Return error if admin attempts to write a non-empty
> > > mems_allowed node mask containing only memoryless-nodes.
> > >
> > > Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
> >
> > Lee, while looking at this change, I think it ends up fixing
> > cpuset_mems_allowed() to return nodemasks that only include nodes in
> > node_states[N_MEMORY]. However, cpuset_current_mems_allowed is a
> > lockless macro which would still be broken. I think it would need to
> > becom a static inline nodes_and() in the CPUSET case and a #define
> > node_states[N_MEMORY] in the non-CPUSET case?
> >
> > Or perhaps we should adjust cpusets to make it so that the mems_allowed
> > member only includes nodes that are set in node_states[N_MEMORY]?
>
>
> I thought that's what my patch to nodelist_parse() did. It ensures that
> current->mems_allowed is correct [contains at least one node with
> memory, and only nodes with memory] at the time it is installed, but
> doesn't consider memory hot plug and node off-lining. Is this
> [offline/hotplug] your point?
And everytime it is updated, right? (current->mems_allowed). My concern
is purely whether I can then directly use cpuset_current_mems_allowed in
the interleave code for hugetlb.c and it will do the right thing. It
will work, if the #define is changed for !CPUSETS and if your change
guarantess current->mems_allowed is always consistent with
node_states[N_MEMORY].
I think I simply was confused about the full impact of your changes, as
I don't know cpusets that well. I'm going to try and test a memoryless
node box I have at work w/ your change, though, and see what happens.
> Seems like that is an issue that exists in the unpatched code as
> well--i.e., unlike cpuset_mems_allowed(), the lockless, "_current_"
> version does not vet current->mems_allowed against the
> nodes_online_mask. So, all valid nodes in current->mems_allowed could
> have been off-lined since the mask was installed. Am I reading this
> right?
True -- I honestly don't know. I doubt much of this code has been fully
audited for full node unplug?
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-23 21:48 ` Nishanth Aravamudan
@ 2007-07-24 14:11 ` Lee Schermerhorn
2007-07-24 16:16 ` Nishanth Aravamudan
0 siblings, 1 reply; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-24 14:11 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On Mon, 2007-07-23 at 14:48 -0700, Nishanth Aravamudan wrote:
> On 23.07.2007 [16:59:52 -0400], Lee Schermerhorn wrote:
> > On Mon, 2007-07-23 at 12:09 -0700, Nishanth Aravamudan wrote:
> > > On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> > > > This fixes a problem I encountered testing Christoph's memoryless nodes
> > > > series. Applies atop that series. Other than this, series holds up
> > > > under what testing I've been able to do this week.
> > > >
> > > > Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
> > > >
> > > > cpusets try to ensure that any node added to a cpuset's
> > > > mems_allowed is on-line and contains memory. The assumption
> > > > was that online nodes contained memory. Thus, it is possible
> > > > to add memoryless nodes to a cpuset and then add tasks to this
> > > > cpuset. This results in continuous series of oom-kill and other
> > > > console stack traces and apparent system hang.
> > > >
> > > > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > > > node_memory_map] in place of node_online_map when vetting
> > > > memories. Return error if admin attempts to write a non-empty
> > > > mems_allowed node mask containing only memoryless-nodes.
> > > >
> > > > Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
> > >
> > > Lee, while looking at this change, I think it ends up fixing
> > > cpuset_mems_allowed() to return nodemasks that only include nodes in
> > > node_states[N_MEMORY]. However, cpuset_current_mems_allowed is a
> > > lockless macro which would still be broken. I think it would need to
> > > becom a static inline nodes_and() in the CPUSET case and a #define
> > > node_states[N_MEMORY] in the non-CPUSET case?
> > >
> > > Or perhaps we should adjust cpusets to make it so that the mems_allowed
> > > member only includes nodes that are set in node_states[N_MEMORY]?
> >
> >
> > I thought that's what my patch to nodelist_parse() did. It ensures that
> > current->mems_allowed is correct [contains at least one node with
> > memory, and only nodes with memory] at the time it is installed, but
> > doesn't consider memory hot plug and node off-lining. Is this
> > [offline/hotplug] your point?
>
> And everytime it is updated, right? (current->mems_allowed). My concern
> is purely whether I can then directly use cpuset_current_mems_allowed in
> the interleave code for hugetlb.c and it will do the right thing. It
> will work, if the #define is changed for !CPUSETS and if your change
> guarantess current->mems_allowed is always consistent with
> node_states[N_MEMORY].
Other than offlining/hot removal of memory, I think the only place that
current->mems_allowed gets updated in in update_nodelist() [I wrote
nodelist_parse() previously by mistake]. My patch to that function
tries to ensure that current->mems_allowed always contains at least one
node with memory.
If by "gets updated" you're referring to
"cpuset_update_task_memory_state(), the latter calls
"guarantee_online_mems()", which I also patched to use
node_states[N_MEMORY] instead of "node_online_map". So, I think you can
use current->mems_allowed in the hugetlb code. Maybe call
"cpuset_update_task_memory_state()" before using it? However, I think
that will have the effect of escaping the cpuset constraints if all of
the nodes in the current task's mems_allowed have been offlined or hot
removed since this mask was created/updated in update_nodelist().
>
> I think I simply was confused about the full impact of your changes, as
> I don't know cpusets that well. I'm going to try and test a memoryless
> node box I have at work w/ your change, though, and see what happens.
FYI: I initially tried to test Christoph's memless nodes series with
your rebased hugetlb patches, but the system appeared to hang. [Might
be related to Ken Chen's recent hugetlb patch?] I backed off to just
Christoph's series and things seem to run OK. That's when I noticed
that one could create a cpuset with just memoryless nodes and posted the
subject patch. I'll get back to testing your patches on my memoryless
nodes system "real soon now".
Meanwhile, as you've pointed out, I missed the "node_online_map" usage
in the header and, I see, in the initialization of the top level cpuset
in cpuset_init_smp(). I'm testing this now. I'll repost the patch with
these fixes shortly.
For completeness, here's the numactl --hardware output [less the SLIT
info] from my test platform [ia64] in it's current config:
available: 5 nodes (0-4)
node 0 size: 0 MB
node 0 free: 0 MB
node 1 size: 0 MB
node 1 free: 0 MB
node 2 size: 0 MB
node 2 free: 0 MB
node 3 size: 0 MB
node 3 free: 0 MB
node 4 size: 8191 MB
node 4 free: 105 MB
Booted with mem=8G to ensure swapping, ... Free mem is so low because
of the tests I'm running. It varies between ~40M and ~150M.
>
> > Seems like that is an issue that exists in the unpatched code as
> > well--i.e., unlike cpuset_mems_allowed(), the lockless, "_current_"
> > version does not vet current->mems_allowed against the
> > nodes_online_mask. So, all valid nodes in current->mems_allowed could
> > have been off-lined since the mask was installed. Am I reading this
> > right?
>
> True -- I honestly don't know. I doubt much of this code has been fully
> audited for full node unplug?
Looks like at least an initial stab has been made...
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 14:11 ` Lee Schermerhorn
@ 2007-07-24 16:16 ` Nishanth Aravamudan
0 siblings, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-24 16:16 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [10:11:03 -0400], Lee Schermerhorn wrote:
> On Mon, 2007-07-23 at 14:48 -0700, Nishanth Aravamudan wrote:
> > On 23.07.2007 [16:59:52 -0400], Lee Schermerhorn wrote:
> > > On Mon, 2007-07-23 at 12:09 -0700, Nishanth Aravamudan wrote:
> > > > On 20.07.2007 [16:49:24 -0400], Lee Schermerhorn wrote:
> > > > > This fixes a problem I encountered testing Christoph's memoryless nodes
> > > > > series. Applies atop that series. Other than this, series holds up
> > > > > under what testing I've been able to do this week.
> > > > >
> > > > > Memoryless Nodes: use "node_memory_map" for cpusets mems_allowed validation
> > > > >
> > > > > cpusets try to ensure that any node added to a cpuset's
> > > > > mems_allowed is on-line and contains memory. The assumption
> > > > > was that online nodes contained memory. Thus, it is possible
> > > > > to add memoryless nodes to a cpuset and then add tasks to this
> > > > > cpuset. This results in continuous series of oom-kill and other
> > > > > console stack traces and apparent system hang.
> > > > >
> > > > > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > > > > node_memory_map] in place of node_online_map when vetting
> > > > > memories. Return error if admin attempts to write a non-empty
> > > > > mems_allowed node mask containing only memoryless-nodes.
> > > > >
> > > > > Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
> > > >
> > > > Lee, while looking at this change, I think it ends up fixing
> > > > cpuset_mems_allowed() to return nodemasks that only include nodes in
> > > > node_states[N_MEMORY]. However, cpuset_current_mems_allowed is a
> > > > lockless macro which would still be broken. I think it would need to
> > > > becom a static inline nodes_and() in the CPUSET case and a #define
> > > > node_states[N_MEMORY] in the non-CPUSET case?
> > > >
> > > > Or perhaps we should adjust cpusets to make it so that the mems_allowed
> > > > member only includes nodes that are set in node_states[N_MEMORY]?
> > >
> > >
> > > I thought that's what my patch to nodelist_parse() did. It ensures that
> > > current->mems_allowed is correct [contains at least one node with
> > > memory, and only nodes with memory] at the time it is installed, but
> > > doesn't consider memory hot plug and node off-lining. Is this
> > > [offline/hotplug] your point?
> >
> > And everytime it is updated, right? (current->mems_allowed). My concern
> > is purely whether I can then directly use cpuset_current_mems_allowed in
> > the interleave code for hugetlb.c and it will do the right thing. It
> > will work, if the #define is changed for !CPUSETS and if your change
> > guarantess current->mems_allowed is always consistent with
> > node_states[N_MEMORY].
>
> Other than offlining/hot removal of memory, I think the only place
> that current->mems_allowed gets updated in in update_nodelist() [I
> wrote nodelist_parse() previously by mistake]. My patch to that
> function tries to ensure that current->mems_allowed always contains at
> least one node with memory.
Ok.
> If by "gets updated" you're referring to
> "cpuset_update_task_memory_state(), the latter calls
> "guarantee_online_mems()", which I also patched to use
> node_states[N_MEMORY] instead of "node_online_map". So, I think you
> can use current->mems_allowed in the hugetlb code. Maybe call
> "cpuset_update_task_memory_state()" before using it? However, I think
> that will have the effect of escaping the cpuset constraints if all of
> the nodes in the current task's mems_allowed have been offlined or hot
> removed since this mask was created/updated in update_nodelist().
Ok, well, I'll test on a memoryless configuration here and see if just
using cpuset_current_mems_allowed is sufficient.
> > I think I simply was confused about the full impact of your changes,
> > as I don't know cpusets that well. I'm going to try and test a
> > memoryless node box I have at work w/ your change, though, and see
> > what happens.
>
> FYI: I initially tried to test Christoph's memless nodes series with
> your rebased hugetlb patches, but the system appeared to hang. [Might
> be related to Ken Chen's recent hugetlb patch?]
Were you running all of the patches on top of -mm? That's what I've been
testing as well.
> I backed off to just Christoph's series and things seem to run OK.
> That's when I noticed that one could create a cpuset with just
> memoryless nodes and posted the subject patch. I'll get back to
> testing your patches on my memoryless nodes system "real soon now".
Cool, please keep me posted.
> Meanwhile, as you've pointed out, I missed the "node_online_map" usage
> in the header and, I see, in the initialization of the top level
> cpuset in cpuset_init_smp(). I'm testing this now. I'll repost the
> patch with these fixes shortly.
Cool, I see it in my inbox.
> For completeness, here's the numactl --hardware output [less the SLIT
> info] from my test platform [ia64] in it's current config:
Good info to have. A very restricted configuration :)
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH take2] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-11 19:06 ` [patch 01/12] NUMA: Generic management of nodemasks for various purposes Christoph Lameter
2007-07-11 19:32 ` Lee Schermerhorn
2007-07-20 20:49 ` [PATCH] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation Lee Schermerhorn
@ 2007-07-24 14:15 ` Lee Schermerhorn
2007-07-24 16:19 ` Nishanth Aravamudan
2007-07-24 20:30 ` [PATCH take3] " Lee Schermerhorn
2007-07-24 20:35 ` [PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages Lee Schermerhorn
4 siblings, 1 reply; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-24 14:15 UTC (permalink / raw)
To: Christoph Lameter, Paul Jackson
Cc: akpm, kxr, linux-mm, Nishanth Aravamudan, KAMEZAWA Hiroyuki
Memoryless Nodes: use "node_memory_map" for cpusets - take 2
Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
series
take 2:
+ replaced node_online_map in cpuset_current_mems_allowed()
with node_states[N_MEMORY]
+ replaced node_online_map in cpuset_init_smp() with
node_states[N_MEMORY]
cpusets try to ensure that any node added to a cpuset's
mems_allowed is on-line and contains memory. The assumption
was that online nodes contained memory. Thus, it is possible
to add memoryless nodes to a cpuset and then add tasks to this
cpuset. This results in continuous series of oom-kill and
apparent system hang.
Change cpusets to use node_states[N_MEMORY] [a.k.a.
node_memory_map] in place of node_online_map when vetting
memories. Return error if admin attempts to write a non-empty
mems_allowed node mask containing only memoryless-nodes.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
include/linux/cpuset.h | 2 +-
kernel/cpuset.c | 35 ++++++++++++++++++++++++-----------
2 files changed, 25 insertions(+), 12 deletions(-)
Index: Linux/kernel/cpuset.c
===================================================================
--- Linux.orig/kernel/cpuset.c 2007-07-20 16:02:01.000000000 -0400
+++ Linux/kernel/cpuset.c 2007-07-24 08:38:38.000000000 -0400
@@ -316,26 +316,26 @@ static void guarantee_online_cpus(const
/*
* Return in *pmask the portion of a cpusets's mems_allowed that
- * are online. If none are online, walk up the cpuset hierarchy
- * until we find one that does have some online mems. If we get
- * all the way to the top and still haven't found any online mems,
- * return node_online_map.
+ * are online, with memory. If none are online with memory, walk
+ * up the cpuset hierarchy until we find one that does have some
+ * online mems. If we get all the way to the top and still haven't
+ * found any online mems, return node_states[N_MEMORY].
*
* One way or another, we guarantee to return some non-empty subset
- * of node_online_map.
+ * of node_states[N_MEMORY].
*
* Call with callback_mutex held.
*/
static void guarantee_online_mems(const struct cpuset *cs, nodemask_t *pmask)
{
- while (cs && !nodes_intersects(cs->mems_allowed, node_online_map))
+ while (cs && !nodes_intersects(cs->mems_allowed, node_states[N_MEMORY]))
cs = cs->parent;
if (cs)
- nodes_and(*pmask, cs->mems_allowed, node_online_map);
+ nodes_and(*pmask, cs->mems_allowed, node_states[N_MEMORY]);
else
- *pmask = node_online_map;
- BUG_ON(!nodes_intersects(*pmask, node_online_map));
+ *pmask = node_states[N_MEMORY];
+ BUG_ON(!nodes_intersects(*pmask, node_states[N_MEMORY]));
}
/**
@@ -623,8 +623,21 @@ static int update_nodemask(struct cpuset
retval = nodelist_parse(buf, trialcs.mems_allowed);
if (retval < 0)
goto done;
+ if (!nodes_intersects(trialcs.mems_allowed,
+ node_states[N_MEMORY])) {
+ /*
+ * error if only memoryless nodes specified.
+ */
+ retval = -ENOSPC;
+ goto done;
+ }
}
- nodes_and(trialcs.mems_allowed, trialcs.mems_allowed, node_online_map);
+ /*
+ * Exclude memoryless nodes. We know that trialcs.mems_allowed
+ * contains at least one node with memory.
+ */
+ nodes_and(trialcs.mems_allowed, trialcs.mems_allowed,
+ node_states[N_MEMORY]);
oldmem = cs->mems_allowed;
if (nodes_equal(oldmem, trialcs.mems_allowed)) {
retval = 0; /* Too easy - nothing to do */
@@ -1432,7 +1445,7 @@ void cpuset_track_online_nodes(void)
void __init cpuset_init_smp(void)
{
top_cpuset.cpus_allowed = cpu_online_map;
- top_cpuset.mems_allowed = node_online_map;
+ top_cpuset.mems_allowed = node_states[N_MEMORY];
hotcpu_notifier(cpuset_handle_cpuhp, 0);
}
Index: Linux/include/linux/cpuset.h
===================================================================
--- Linux.orig/include/linux/cpuset.h 2007-07-13 15:41:45.000000000 -0400
+++ Linux/include/linux/cpuset.h 2007-07-24 08:37:50.000000000 -0400
@@ -92,7 +92,7 @@ static inline nodemask_t cpuset_mems_all
return node_possible_map;
}
-#define cpuset_current_mems_allowed (node_online_map)
+#define cpuset_current_mems_allowed (node_states[N_MEMORY))
static inline void cpuset_init_current_mems_allowed(void) {}
static inline void cpuset_update_task_memory_state(void) {}
#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH take2] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 14:15 ` [PATCH take2] " Lee Schermerhorn
@ 2007-07-24 16:19 ` Nishanth Aravamudan
2007-07-24 19:01 ` Lee Schermerhorn
0 siblings, 1 reply; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-24 16:19 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [10:15:25 -0400], Lee Schermerhorn wrote:
> Memoryless Nodes: use "node_memory_map" for cpusets - take 2
>
> Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> series
>
> take 2:
> + replaced node_online_map in cpuset_current_mems_allowed()
> with node_states[N_MEMORY]
> + replaced node_online_map in cpuset_init_smp() with
> node_states[N_MEMORY]
>
> cpusets try to ensure that any node added to a cpuset's
> mems_allowed is on-line and contains memory. The assumption
> was that online nodes contained memory. Thus, it is possible
> to add memoryless nodes to a cpuset and then add tasks to this
> cpuset. This results in continuous series of oom-kill and
> apparent system hang.
>
> Change cpusets to use node_states[N_MEMORY] [a.k.a.
> node_memory_map] in place of node_online_map when vetting
> memories. Return error if admin attempts to write a non-empty
> mems_allowed node mask containing only memoryless-nodes.
I think you still are missing a few comment changes (anything mentioning
'track'ing node_online_map will need to be changed, I think). Also, I
don't see the necessary change in common_cpu_mem_hotplug_unplug()
similar to cpuset_init_smp()'s change.
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH take2] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 16:19 ` Nishanth Aravamudan
@ 2007-07-24 19:01 ` Lee Schermerhorn
2007-07-25 15:50 ` Nishanth Aravamudan
0 siblings, 1 reply; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-24 19:01 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On Tue, 2007-07-24 at 09:19 -0700, Nishanth Aravamudan wrote:
> On 24.07.2007 [10:15:25 -0400], Lee Schermerhorn wrote:
> > Memoryless Nodes: use "node_memory_map" for cpusets - take 2
> >
> > Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> > series
> >
> > take 2:
> > + replaced node_online_map in cpuset_current_mems_allowed()
> > with node_states[N_MEMORY]
> > + replaced node_online_map in cpuset_init_smp() with
> > node_states[N_MEMORY]
> >
> > cpusets try to ensure that any node added to a cpuset's
> > mems_allowed is on-line and contains memory. The assumption
> > was that online nodes contained memory. Thus, it is possible
> > to add memoryless nodes to a cpuset and then add tasks to this
> > cpuset. This results in continuous series of oom-kill and
> > apparent system hang.
> >
> > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > node_memory_map] in place of node_online_map when vetting
> > memories. Return error if admin attempts to write a non-empty
> > mems_allowed node mask containing only memoryless-nodes.
>
> I think you still are missing a few comment changes (anything mentioning
> 'track'ing node_online_map will need to be changed, I think). Also, I
> don't see the necessary change in common_cpu_mem_hotplug_unplug()
> similar to cpuset_init_smp()'s change.
Sorry. Multitasking meltdown... Will fix.
Meanwhile:
I've tested your 3 patches atop Christoph's series [on 22-rc6-mm1], with
and without my cpuset patch and I can't reproduce the hang I saw a
couple of days ago :-(. I hate it when that happens! Perhaps some
system daemon started up during the test that hung.
Later,
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH take2] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 19:01 ` Lee Schermerhorn
@ 2007-07-25 15:50 ` Nishanth Aravamudan
0 siblings, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-25 15:50 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [15:01:33 -0400], Lee Schermerhorn wrote:
> On Tue, 2007-07-24 at 09:19 -0700, Nishanth Aravamudan wrote:
> > On 24.07.2007 [10:15:25 -0400], Lee Schermerhorn wrote:
> > > Memoryless Nodes: use "node_memory_map" for cpusets - take 2
> > >
> > > Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> > > series
> > >
> > > take 2:
> > > + replaced node_online_map in cpuset_current_mems_allowed()
> > > with node_states[N_MEMORY]
> > > + replaced node_online_map in cpuset_init_smp() with
> > > node_states[N_MEMORY]
> > >
> > > cpusets try to ensure that any node added to a cpuset's
> > > mems_allowed is on-line and contains memory. The assumption
> > > was that online nodes contained memory. Thus, it is possible
> > > to add memoryless nodes to a cpuset and then add tasks to this
> > > cpuset. This results in continuous series of oom-kill and
> > > apparent system hang.
> > >
> > > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > > node_memory_map] in place of node_online_map when vetting
> > > memories. Return error if admin attempts to write a non-empty
> > > mems_allowed node mask containing only memoryless-nodes.
> >
> > I think you still are missing a few comment changes (anything mentioning
> > 'track'ing node_online_map will need to be changed, I think). Also, I
> > don't see the necessary change in common_cpu_mem_hotplug_unplug()
> > similar to cpuset_init_smp()'s change.
>
> Sorry. Multitasking meltdown... Will fix.
>
> Meanwhile:
>
> I've tested your 3 patches atop Christoph's series [on 22-rc6-mm1],
> with and without my cpuset patch and I can't reproduce the hang I saw
> a couple of days ago :-(. I hate it when that happens! Perhaps some
> system daemon started up during the test that hung.
Hrm, that stinks. I tested on several h/w variations before posting. And
the changes are pretty transparent, so I'm not sure where we'd hang (and
I would think if we were, we'd see it now too). But I'll do another
audit just to be sure.
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-11 19:06 ` [patch 01/12] NUMA: Generic management of nodemasks for various purposes Christoph Lameter
` (2 preceding siblings ...)
2007-07-24 14:15 ` [PATCH take2] " Lee Schermerhorn
@ 2007-07-24 20:30 ` Lee Schermerhorn
2007-07-25 15:53 ` Nishanth Aravamudan
` (2 more replies)
2007-07-24 20:35 ` [PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages Lee Schermerhorn
4 siblings, 3 replies; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-24 20:30 UTC (permalink / raw)
To: Christoph Lameter, Paul Jackson, Nishanth Aravamudan
Cc: akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
Memoryless Nodes: use "node_memory_map" for cpusets - take 3
Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
series
take 2:
+ replaced node_online_map in cpuset_current_mems_allowed()
with node_states[N_MEMORY]
+ replaced node_online_map in cpuset_init_smp() with
node_states[N_MEMORY]
take 3:
+ fix up comments and top level cpuset tracking of nodes
with memory [instead of on-line nodes].
+ maybe I got them all this time?
cpusets try to ensure that any node added to a cpuset's
mems_allowed is on-line and contains memory. The assumption
was that online nodes contained memory. Thus, it is possible
to add memoryless nodes to a cpuset and then add tasks to this
cpuset. This results in continuous series of oom-kill and
apparent system hang.
Change cpusets to use node_states[N_MEMORY] [a.k.a.
node_memory_map] in place of node_online_map when vetting
memories. Return error if admin attempts to write a non-empty
mems_allowed node mask containing only memoryless-nodes.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
include/linux/cpuset.h | 2 -
kernel/cpuset.c | 51 +++++++++++++++++++++++++++++++------------------
2 files changed, 34 insertions(+), 19 deletions(-)
Index: Linux/kernel/cpuset.c
===================================================================
--- Linux.orig/kernel/cpuset.c 2007-07-24 11:24:56.000000000 -0400
+++ Linux/kernel/cpuset.c 2007-07-24 12:20:40.000000000 -0400
@@ -316,26 +316,26 @@ static void guarantee_online_cpus(const
/*
* Return in *pmask the portion of a cpusets's mems_allowed that
- * are online. If none are online, walk up the cpuset hierarchy
- * until we find one that does have some online mems. If we get
- * all the way to the top and still haven't found any online mems,
- * return node_online_map.
+ * are online, with memory. If none are online with memory, walk
+ * up the cpuset hierarchy until we find one that does have some
+ * online mems. If we get all the way to the top and still haven't
+ * found any online mems, return node_states[N_MEMORY].
*
* One way or another, we guarantee to return some non-empty subset
- * of node_online_map.
+ * of node_states[N_MEMORY].
*
* Call with callback_mutex held.
*/
static void guarantee_online_mems(const struct cpuset *cs, nodemask_t *pmask)
{
- while (cs && !nodes_intersects(cs->mems_allowed, node_online_map))
+ while (cs && !nodes_intersects(cs->mems_allowed, node_states[N_MEMORY]))
cs = cs->parent;
if (cs)
- nodes_and(*pmask, cs->mems_allowed, node_online_map);
+ nodes_and(*pmask, cs->mems_allowed, node_states[N_MEMORY]);
else
- *pmask = node_online_map;
- BUG_ON(!nodes_intersects(*pmask, node_online_map));
+ *pmask = node_states[N_MEMORY];
+ BUG_ON(!nodes_intersects(*pmask, node_states[N_MEMORY]));
}
/**
@@ -606,7 +606,7 @@ static int update_nodemask(struct cpuset
int retval;
struct container_iter it;
- /* top_cpuset.mems_allowed tracks node_online_map; it's read-only */
+ /* top_cpuset.mems_allowed tracks node_states[N_MEMORY]; it's read-only */
if (cs == &top_cpuset)
return -EACCES;
@@ -623,8 +623,21 @@ static int update_nodemask(struct cpuset
retval = nodelist_parse(buf, trialcs.mems_allowed);
if (retval < 0)
goto done;
+ if (!nodes_intersects(trialcs.mems_allowed,
+ node_states[N_MEMORY])) {
+ /*
+ * error if only memoryless nodes specified.
+ */
+ retval = -ENOSPC;
+ goto done;
+ }
}
- nodes_and(trialcs.mems_allowed, trialcs.mems_allowed, node_online_map);
+ /*
+ * Exclude memoryless nodes. We know that trialcs.mems_allowed
+ * contains at least one node with memory.
+ */
+ nodes_and(trialcs.mems_allowed, trialcs.mems_allowed,
+ node_states[N_MEMORY]);
oldmem = cs->mems_allowed;
if (nodes_equal(oldmem, trialcs.mems_allowed)) {
retval = 0; /* Too easy - nothing to do */
@@ -1366,8 +1379,9 @@ static void guarantee_online_cpus_mems_i
/*
* The cpus_allowed and mems_allowed nodemasks in the top_cpuset track
- * cpu_online_map and node_online_map. Force the top cpuset to track
- * whats online after any CPU or memory node hotplug or unplug event.
+ * cpu_online_map and node_states[N_MEMORY]. Force the top cpuset to
+ * track what's online after any CPU or memory node hotplug or unplug
+ * event.
*
* To ensure that we don't remove a CPU or node from the top cpuset
* that is currently in use by a child cpuset (which would violate
@@ -1387,7 +1401,7 @@ static void common_cpu_mem_hotplug_unplu
guarantee_online_cpus_mems_in_subtree(&top_cpuset);
top_cpuset.cpus_allowed = cpu_online_map;
- top_cpuset.mems_allowed = node_online_map;
+ top_cpuset.mems_allowed = node_states[N_MEMORY];
mutex_unlock(&callback_mutex);
container_unlock();
@@ -1412,8 +1426,9 @@ static int cpuset_handle_cpuhp(struct no
#ifdef CONFIG_MEMORY_HOTPLUG
/*
- * Keep top_cpuset.mems_allowed tracking node_online_map.
- * Call this routine anytime after you change node_online_map.
+ * Keep top_cpuset.mems_allowed tracking node_states[N_MEMORY].
+ * Call this routine anytime after you change
+ * node_states[N_MEMORY].
* See also the previous routine cpuset_handle_cpuhp().
*/
@@ -1432,7 +1447,7 @@ void cpuset_track_online_nodes(void)
void __init cpuset_init_smp(void)
{
top_cpuset.cpus_allowed = cpu_online_map;
- top_cpuset.mems_allowed = node_online_map;
+ top_cpuset.mems_allowed = node_states[N_MEMORY];
hotcpu_notifier(cpuset_handle_cpuhp, 0);
}
@@ -1472,7 +1487,7 @@ void cpuset_init_current_mems_allowed(vo
*
* Description: Returns the nodemask_t mems_allowed of the cpuset
* attached to the specified @tsk. Guaranteed to return some non-empty
- * subset of node_online_map, even if this means going outside the
+ * subset of node_states[N_MEMORY], even if this means going outside the
* tasks cpuset.
**/
Index: Linux/include/linux/cpuset.h
===================================================================
--- Linux.orig/include/linux/cpuset.h 2007-07-24 11:24:56.000000000 -0400
+++ Linux/include/linux/cpuset.h 2007-07-24 12:20:56.000000000 -0400
@@ -92,7 +92,7 @@ static inline nodemask_t cpuset_mems_all
return node_possible_map;
}
-#define cpuset_current_mems_allowed (node_online_map)
+#define cpuset_current_mems_allowed (node_states[N_MEMORY))
static inline void cpuset_init_current_mems_allowed(void) {}
static inline void cpuset_update_task_memory_state(void) {}
#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 20:30 ` [PATCH take3] " Lee Schermerhorn
@ 2007-07-25 15:53 ` Nishanth Aravamudan
2007-07-25 22:00 ` Nishanth Aravamudan
2007-07-27 0:40 ` Nishanth Aravamudan
2 siblings, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-25 15:53 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [16:30:19 -0400], Lee Schermerhorn wrote:
> Memoryless Nodes: use "node_memory_map" for cpusets - take 3
>
> Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> series
>
> take 2:
> + replaced node_online_map in cpuset_current_mems_allowed()
> with node_states[N_MEMORY]
> + replaced node_online_map in cpuset_init_smp() with
> node_states[N_MEMORY]
>
> take 3:
> + fix up comments and top level cpuset tracking of nodes
> with memory [instead of on-line nodes].
> + maybe I got them all this time?
Looks like it! :)
> cpusets try to ensure that any node added to a cpuset's
> mems_allowed is on-line and contains memory. The assumption
> was that online nodes contained memory. Thus, it is possible
> to add memoryless nodes to a cpuset and then add tasks to this
> cpuset. This results in continuous series of oom-kill and
> apparent system hang.
>
> Change cpusets to use node_states[N_MEMORY] [a.k.a.
> node_memory_map] in place of node_online_map when vetting
> memories. Return error if admin attempts to write a non-empty
> mems_allowed node mask containing only memoryless-nodes.
>
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Tested on 4-node ppc64 with 2 memoryless nodes. Top cpuset (and all
subsequent ones) only allow nodes 0 and 1 (the nodes with memory).
Tested-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 20:30 ` [PATCH take3] " Lee Schermerhorn
2007-07-25 15:53 ` Nishanth Aravamudan
@ 2007-07-25 22:00 ` Nishanth Aravamudan
2007-07-26 13:04 ` Lee Schermerhorn
2007-07-27 0:40 ` Nishanth Aravamudan
2 siblings, 1 reply; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-25 22:00 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [16:30:19 -0400], Lee Schermerhorn wrote:
> Memoryless Nodes: use "node_memory_map" for cpusets - take 3
>
> Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> series
>
> take 2:
> + replaced node_online_map in cpuset_current_mems_allowed()
> with node_states[N_MEMORY]
> + replaced node_online_map in cpuset_init_smp() with
> node_states[N_MEMORY]
>
> take 3:
> + fix up comments and top level cpuset tracking of nodes
> with memory [instead of on-line nodes].
> + maybe I got them all this time?
My ack stands, but I believe Documentation/cpusets.txt will need
updating too :)
Thanks,
Nish
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-25 22:00 ` Nishanth Aravamudan
@ 2007-07-26 13:04 ` Lee Schermerhorn
0 siblings, 0 replies; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-26 13:04 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On Wed, 2007-07-25 at 15:00 -0700, Nishanth Aravamudan wrote:
> On 24.07.2007 [16:30:19 -0400], Lee Schermerhorn wrote:
> > Memoryless Nodes: use "node_memory_map" for cpusets - take 3
> >
> > Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> > series
> >
> > take 2:
> > + replaced node_online_map in cpuset_current_mems_allowed()
> > with node_states[N_MEMORY]
> > + replaced node_online_map in cpuset_init_smp() with
> > node_states[N_MEMORY]
> >
> > take 3:
> > + fix up comments and top level cpuset tracking of nodes
> > with memory [instead of on-line nodes].
> > + maybe I got them all this time?
>
> My ack stands, but I believe Documentation/cpusets.txt will need
> updating too :)
When [he says hopefully] I get the patches memoryless patches tested on
23-rc1-mm1, I'll include a documentation update patch.
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-24 20:30 ` [PATCH take3] " Lee Schermerhorn
2007-07-25 15:53 ` Nishanth Aravamudan
2007-07-25 22:00 ` Nishanth Aravamudan
@ 2007-07-27 0:40 ` Nishanth Aravamudan
2007-07-27 14:15 ` Lee Schermerhorn
2 siblings, 1 reply; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-27 0:40 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm, KAMEZAWA Hiroyuki
On 24.07.2007 [16:30:19 -0400], Lee Schermerhorn wrote:
> Memoryless Nodes: use "node_memory_map" for cpusets - take 3
>
> Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> series
>
> take 2:
> + replaced node_online_map in cpuset_current_mems_allowed()
> with node_states[N_MEMORY]
> + replaced node_online_map in cpuset_init_smp() with
> node_states[N_MEMORY]
>
> take 3:
> + fix up comments and top level cpuset tracking of nodes
> with memory [instead of on-line nodes].
> + maybe I got them all this time?
>
> cpusets try to ensure that any node added to a cpuset's
> mems_allowed is on-line and contains memory. The assumption
> was that online nodes contained memory. Thus, it is possible
> to add memoryless nodes to a cpuset and then add tasks to this
> cpuset. This results in continuous series of oom-kill and
> apparent system hang.
>
> Change cpusets to use node_states[N_MEMORY] [a.k.a.
> node_memory_map] in place of node_online_map when vetting
> memories. Return error if admin attempts to write a non-empty
> mems_allowed node mask containing only memoryless-nodes.
>
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
>
> include/linux/cpuset.h | 2 -
> kernel/cpuset.c | 51 +++++++++++++++++++++++++++++++------------------
> 2 files changed, 34 insertions(+), 19 deletions(-)
Small typo fix which prevents build with !CPUSETS.
---
FYI: I noticed that oldconfig on 2.6.23-rc1-mm1 with CPUSETS=y disables
CPUSETS because of the introduction of CONFIG_CONTAINERS :(
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index f8f4f68..d01b1bc 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -92,7 +92,7 @@ static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
return node_possible_map;
}
-#define cpuset_current_mems_allowed (node_states[N_MEMORY))
+#define cpuset_current_mems_allowed (node_states[N_MEMORY])
static inline void cpuset_init_current_mems_allowed(void) {}
static inline void cpuset_update_task_memory_state(void) {}
#define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH take3] Memoryless nodes: use "node_memory_map" for cpuset mems_allowed validation
2007-07-27 0:40 ` Nishanth Aravamudan
@ 2007-07-27 14:15 ` Lee Schermerhorn
0 siblings, 0 replies; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-27 14:15 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Christoph Lameter, Paul Jackson, akpm, kxr, linux-mm,
KAMEZAWA Hiroyuki, Bob Picco
On Thu, 2007-07-26 at 17:40 -0700, Nishanth Aravamudan wrote:
> On 24.07.2007 [16:30:19 -0400], Lee Schermerhorn wrote:
> > Memoryless Nodes: use "node_memory_map" for cpusets - take 3
> >
> > Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless nodes
> > series
> >
> > take 2:
> > + replaced node_online_map in cpuset_current_mems_allowed()
> > with node_states[N_MEMORY]
> > + replaced node_online_map in cpuset_init_smp() with
> > node_states[N_MEMORY]
> >
> > take 3:
> > + fix up comments and top level cpuset tracking of nodes
> > with memory [instead of on-line nodes].
> > + maybe I got them all this time?
> >
> > cpusets try to ensure that any node added to a cpuset's
> > mems_allowed is on-line and contains memory. The assumption
> > was that online nodes contained memory. Thus, it is possible
> > to add memoryless nodes to a cpuset and then add tasks to this
> > cpuset. This results in continuous series of oom-kill and
> > apparent system hang.
> >
> > Change cpusets to use node_states[N_MEMORY] [a.k.a.
> > node_memory_map] in place of node_online_map when vetting
> > memories. Return error if admin attempts to write a non-empty
> > mems_allowed node mask containing only memoryless-nodes.
> >
> > Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
> >
> > include/linux/cpuset.h | 2 -
> > kernel/cpuset.c | 51 +++++++++++++++++++++++++++++++------------------
> > 2 files changed, 34 insertions(+), 19 deletions(-)
>
> Small typo fix which prevents build with !CPUSETS.
>
> ---
> FYI: I noticed that oldconfig on 2.6.23-rc1-mm1 with CPUSETS=y disables
> CPUSETS because of the introduction of CONFIG_CONTAINERS :(
>
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
>
> diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
> index f8f4f68..d01b1bc 100644
> --- a/include/linux/cpuset.h
> +++ b/include/linux/cpuset.h
> @@ -92,7 +92,7 @@ static inline nodemask_t cpuset_mems_allowed(struct task_struct *p)
> return node_possible_map;
> }
>
> -#define cpuset_current_mems_allowed (node_states[N_MEMORY))
> +#define cpuset_current_mems_allowed (node_states[N_MEMORY])
> static inline void cpuset_init_current_mems_allowed(void) {}
> static inline void cpuset_update_task_memory_state(void) {}
> #define cpuset_nodes_subset_current_mems_allowed(nodes) (1)
>
Thanks, Nish. Bob Picco pointed that out to me and I've fixed it in
take4. Bob is reviewing the patches and should get back to me today if
he has any issues. I've tested the current patches against 23-rc1-mm1
overnight on the following config and it held up fine.
Configuration: 100% cell local memory, boot with mem=16g [out of 32G
available]. Gave me one memoryless node, and one very small node:
available: 5 nodes (0-4)
node 0 size: 7600 MB
node 0 free: 6647 MB
node 1 size: 8127 MB
node 1 free: 7675 MB
node 2 size: 144 MB
node 2 free: 94 MB
node 3 size: 0 MB
node 3 free: 0 MB
node 4 size: 511 MB
node 4 free: 494 MB
Ran test exerciser [custom workload in Dave Anderson's "usex" program]
in a cpuset containing cpus and memory from nodes 1-3]. Not a lot of
mempolicy testing, but fairly stressful, otherwise.
Lee
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread
* [PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages
2007-07-11 19:06 ` [patch 01/12] NUMA: Generic management of nodemasks for various purposes Christoph Lameter
` (3 preceding siblings ...)
2007-07-24 20:30 ` [PATCH take3] " Lee Schermerhorn
@ 2007-07-24 20:35 ` Lee Schermerhorn
2007-07-25 15:56 ` Nishanth Aravamudan
4 siblings, 1 reply; 48+ messages in thread
From: Lee Schermerhorn @ 2007-07-24 20:35 UTC (permalink / raw)
To: linux-mm
Cc: Christoph Lameter, Nishanth Aravamudan, akpm, kxr, KAMEZAWA Hiroyuki
Suppress redundant "node with no memory" messages
Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless
node series.
get_pfn_range_for_nid() is called multiple times for each node
at boot time. Each time, it will warn about nodes with no
memory, resulting in boot messages like:
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
Node 0 active with no memory
On node 0 totalpages: 0
Node 0 active with no memory
Node 0 active with no memory
DMA zone: 0 pages used for memmap
Node 0 active with no memory
Node 0 active with no memory
Normal zone: 0 pages used for memmap
Node 0 active with no memory
Node 0 active with no memory
Movable zone: 0 pages used for memmap
and so on for each memoryless node. Track [in init data]
memoryless nodes that we've already reported to suppress
the redundant messages.
OR, we could eliminate the message altogether? We do
report zero totalpages. Sufficient?
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
mm/page_alloc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Index: Linux/mm/page_alloc.c
===================================================================
--- Linux.orig/mm/page_alloc.c 2007-07-13 15:52:22.000000000 -0400
+++ Linux/mm/page_alloc.c 2007-07-24 12:37:35.000000000 -0400
@@ -3081,6 +3081,8 @@ static void __meminit account_node_bound
* with no available memory, a warning is printed and the start and end
* PFNs will be 0.
*/
+static nodemask_t __meminitdata memoryless_nodes;
+
void __meminit get_pfn_range_for_nid(unsigned int nid,
unsigned long *start_pfn, unsigned long *end_pfn)
{
@@ -3094,7 +3096,11 @@ void __meminit get_pfn_range_for_nid(uns
}
if (*start_pfn == -1UL) {
- printk(KERN_WARNING "Node %u active with no memory\n", nid);
+ if (!node_isset(nid, memoryless_nodes)) {
+ printk(KERN_WARNING "Node %u active with no memory\n",
+ nid);
+ node_set(nid, memoryless_nodes);
+ }
*start_pfn = 0;
}
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread* Re: [PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages
2007-07-24 20:35 ` [PATCH/RFC] Memoryless nodes: Suppress redundant "node with no memory" messages Lee Schermerhorn
@ 2007-07-25 15:56 ` Nishanth Aravamudan
0 siblings, 0 replies; 48+ messages in thread
From: Nishanth Aravamudan @ 2007-07-25 15:56 UTC (permalink / raw)
To: Lee Schermerhorn
Cc: linux-mm, Christoph Lameter, akpm, kxr, KAMEZAWA Hiroyuki
On 24.07.2007 [16:35:13 -0400], Lee Schermerhorn wrote:
> Suppress redundant "node with no memory" messages
>
> Against 2.6.22-rc6-mm1 atop Christoph Lameter's memoryless
> node series.
>
> get_pfn_range_for_nid() is called multiple times for each node
> at boot time. Each time, it will warn about nodes with no
> memory, resulting in boot messages like:
>
> Node 0 active with no memory
> Node 0 active with no memory
> Node 0 active with no memory
> Node 0 active with no memory
> Node 0 active with no memory
> Node 0 active with no memory
> On node 0 totalpages: 0
> Node 0 active with no memory
> Node 0 active with no memory
> DMA zone: 0 pages used for memmap
> Node 0 active with no memory
> Node 0 active with no memory
> Normal zone: 0 pages used for memmap
> Node 0 active with no memory
> Node 0 active with no memory
> Movable zone: 0 pages used for memmap
>
> and so on for each memoryless node. Track [in init data]
> memoryless nodes that we've already reported to suppress
> the redundant messages.
>
> OR, we could eliminate the message altogether? We do
> report zero totalpages. Sufficient?
Not being an expert, I honestly don't know. But I do think it's quite
clear that we only need one or the other type of message (presuming both
are always shown, that is neither can somehow already be disabled), as
they say the same thing :) I found this to be odd behavior too.
> Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Nishanth Aravamudan <nacc@us.ibm.com>
--
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>
^ permalink raw reply [flat|nested] 48+ messages in thread