From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: akpm@linux-foundation.org,
Dhaval Giani <dhaval@linux.vnet.ibm.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
Christoph Lameter <clameter@sgi.com>
Cc: bob.picco@hp.com, nacc@us.ibm.com,
kamezawa.hiroyu@jp.fujitsu.com, mel@skynet.ie,
Balbir Singh <balbir@in.ibm.com>,
Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>,
lkml <linux-kernel@vger.kernel.org>,
ckrm-tech <ckrm-tech@lists.sourceforge.net>
Subject: Re: Regression in 2.6.23-rc2-mm2, mounting cpusets causes a hang
Date: Thu, 16 Aug 2007 09:26:37 -0400 [thread overview]
Message-ID: <1187270797.5900.9.camel@localhost> (raw)
In-Reply-To: <20070815165234.GC1179@linux.vnet.ibm.com>
Andrew: this one should go with the other memoryless node patches.
Lee
---------------------------------------
PATCH Initialize N_*_MEMORY and N_CPU masks for non-NUMA config
Against: 2.6.23-rc2-mm2
The N_*_MEMORY and N_CPU node state masks are not being initialized
for !NUMA because node_set_state() becomes a no-op for that config.
This causes one to hit a BUG_ON() attempting to mount cpusets to partition
cpus. Discovered and diagnosed by Serge Hallyn and Dhaval Giani.
Statically initialize the N_*_MEMORY and N_CPU node state masks
for !NUMA configurations. This static initialization is required
because the node_set_state() function becomes a no-op for !NUMA.
Other generic code assumes that these masks are set correctly.
Note that in NUMA configurations, these masks will be populated
correctly, so don't bother with static initialization. No sense
in making assumptions that could be broken down the road, resulting
in extra work for someone to debug. Unlikely, perhaps, but who
needs the aggravation...
Tested on i386 !NUMA by Dhaval Giani. Fixes cpuset BUG.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
mm/page_alloc.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Index: Linux/mm/page_alloc.c
===================================================================
--- Linux.orig/mm/page_alloc.c 2007-08-15 10:01:23.000000000 -0400
+++ Linux/mm/page_alloc.c 2007-08-15 10:05:41.000000000 -0400
@@ -52,7 +52,14 @@
*/
nodemask_t node_states[NR_NODE_STATES] __read_mostly = {
[N_POSSIBLE] = NODE_MASK_ALL,
- [N_ONLINE] = { { [0] = 1UL } }
+ [N_ONLINE] = { { [0] = 1UL } },
+#ifndef CONFIG_NUMA
+ [N_NORMAL_MEMORY] = { { [0] = 1UL } },
+#ifdef CONFIG_HIGHMEM
+ [N_HIGH_MEMORY] = { { [0] = 1UL } },
+#endif
+ [N_CPU] = { { [0] = 1UL } },
+#endif /* NUMA */
};
EXPORT_SYMBOL(node_states);
next prev parent reply other threads:[~2007-08-16 13:28 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 15:21 Regression in 2.6.23-rc2-mm2, mounting cpusets causes a hang Dhaval Giani
2007-08-13 20:12 ` Serge E. Hallyn
2007-08-14 15:03 ` Lee Schermerhorn
2007-08-14 18:03 ` Serge E. Hallyn
2007-08-14 18:13 ` Lee Schermerhorn
2007-08-14 19:23 ` Serge E. Hallyn
2007-08-14 20:49 ` Serge E. Hallyn
2007-08-14 21:07 ` Lee Schermerhorn
2007-08-14 21:28 ` Christoph Lameter
2007-08-14 21:41 ` Lee Schermerhorn
2007-08-14 21:56 ` Christoph Lameter
2007-08-15 13:43 ` Lee Schermerhorn
2007-08-15 14:31 ` Serge E. Hallyn
2007-08-15 16:23 ` Lee Schermerhorn
2007-08-15 16:31 ` Serge E. Hallyn
2007-08-15 16:52 ` Dhaval Giani
2007-08-15 17:08 ` Serge E. Hallyn
2007-08-15 18:07 ` Lee Schermerhorn
2007-08-15 20:39 ` Christoph Lameter
2007-08-16 13:26 ` Lee Schermerhorn [this message]
2007-08-16 19:14 ` Christoph Lameter
2007-08-15 20:38 ` Christoph Lameter
2007-08-15 16:31 ` Paul Jackson
2007-08-15 16:29 ` Paul Jackson
2007-08-15 17:12 ` Serge E. Hallyn
2007-08-15 18:00 ` Lee Schermerhorn
2007-08-15 18:33 ` Andrew Morton
2007-08-31 16:54 ` [ckrm-tech] " Paul Menage
2007-08-16 4:46 ` Paul Menage
2007-08-15 20:36 ` Christoph Lameter
2007-08-15 20:48 ` Lee Schermerhorn
2007-08-16 2:36 ` [ckrm-tech] " Paul Jackson
2007-08-14 21:37 ` Lee Schermerhorn
2007-08-14 21:39 ` Christoph Lameter
2007-08-14 21:01 ` Lee Schermerhorn
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=1187270797.5900.9.camel@localhost \
--to=lee.schermerhorn@hp.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=bob.picco@hp.com \
--cc=ckrm-tech@lists.sourceforge.net \
--cc=clameter@sgi.com \
--cc=dhaval@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@skynet.ie \
--cc=nacc@us.ibm.com \
--cc=serge@hallyn.com \
--cc=vatsa@linux.vnet.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox