From: Dave Jones <davej@redhat.com>
To: David Rientjes <rientjes@google.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
akpm@linux-foundation.org, zhangyanfei@cn.fujitsu.com,
guz.fnst@cn.fujitsu.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] numa, mem-hotplug: Fix stack overflow in numa when seting kernel nodes to unhotpluggable.
Date: Thu, 23 Jan 2014 01:13:43 -0500 [thread overview]
Message-ID: <20140123061343.GB15206@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1401222203330.8088@chino.kir.corp.google.com>
On Wed, Jan 22, 2014 at 10:06:14PM -0800, David Rientjes wrote:
> On Thu, 23 Jan 2014, Tang Chen wrote:
>
> > Dave found that the kernel will hang during boot. This is because
> > the nodemask_t type stack variable numa_kernel_nodes is large enough
> > to overflow the stack.
> >
> > This doesn't always happen. According to Dave, this happened once
> > in about five boots. The backtrace is like the following:
> >
> > dump_stack
> > panic
> > ? numa_clear_kernel_node_hotplug
> > __stack_chk_fail
> > numa_clear_kernel_node_hotplug
> > ? memblock_search_pfn_nid
> > ? __early_pfn_to_nid
> > numa_init
> > x86_numa_init
> > initmem_init
> > setup_arch
> > start_kernel
> >
> > This patch fix this problem by defining numa_kernel_nodes as a
> > static global variable in __initdata area.
> >
> > Reported-by: Dave Jones <davej@redhat.com>
> > Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
> > Tested-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
>
> I guess it depends on what Dave's CONFIG_NODES_SHIFT is?
It's 10, because I had MAXSMP set.
So, MAX_NUMNODES = 1 << 10
And the bitmask is made of longs. 1024 of them.
How does this work ?
Dave
next prev parent reply other threads:[~2014-01-23 6:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 5:49 [PATCH] numa, mem-hotplug: Fix stack overflow in numa when seting kernel nodes to unhotpluggable Tang Chen
2014-01-23 6:01 ` Dave Jones
2014-01-23 6:05 ` Andrew Morton
2014-01-23 6:06 ` David Rientjes
2014-01-23 6:13 ` Dave Jones [this message]
2014-01-23 6:15 ` David Rientjes
2014-01-23 6:58 ` Dave Jones
2014-01-23 22:31 ` Dave Jones
2014-01-27 7:29 ` Tang Chen
2014-01-27 14:52 ` Dave Jones
2014-01-23 6:36 ` Tang Chen
2014-01-28 0:32 ` David Rientjes
2014-01-28 1:01 ` Tang Chen
2014-01-28 2:55 ` Dave Jones
2014-01-28 3:14 ` Tang Chen
2014-01-28 3:24 ` Tang Chen
2014-01-28 3:55 ` Dave Jones
2014-01-28 4:47 ` Tang Chen
2014-01-28 4:47 ` Dave Jones
2014-01-28 5:17 ` Tang Chen
2014-01-28 6:53 ` Dave Jones
2014-01-28 5:31 ` Tang Chen
2014-01-28 7:10 ` Tang Chen
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=20140123061343.GB15206@redhat.com \
--to=davej@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=guz.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=tangchen@cn.fujitsu.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=zhangyanfei@cn.fujitsu.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