From: Jiang Liu <jiang.liu@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
David Rientjes <rientjes@google.com>,
Ingo Molnar <mingo@redhat.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Tony Luck <tony.luck@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [Bugfix v2] sched: fix possible invalid memory access caused by CPU hot-addition
Date: Wed, 30 Apr 2014 12:26:37 +0800 [thread overview]
Message-ID: <53607B7D.6050205@linux.intel.com> (raw)
In-Reply-To: <20140428070954.GM11096@twins.programming.kicks-ass.net>
Thanks Peter, I will try to find other solutions.
On 2014/4/28 15:09, Peter Zijlstra wrote:
> On Mon, Apr 28, 2014 at 10:48:13AM +0800, Jiang Liu wrote:
>> Intel platforms with Nehalem/Westmere/IvyBridge CPUs may support socket
>> hotplug/online at runtime. The CPU hot-addition flow is:
>> 1) handle CPU hot-addition event
>> 1.a) gather platform specific information
>> 1.b) associate hot-added CPU with NUMA node
>> 1.c) create CPU device
>> 2) online hot-added CPU through sysfs:
>> 2.a) cpu_up()
>> 2.b) ->try_online_node()
>> 2.c) ->hotadd_new_pgdat()
>> 2.d) ->node_set_online()
>>
>> Between 1.b and 2.c, hot-added CPUs are associated with NUMA nodes
>> but those NUMA nodes may still be in offlined state. So we should
>> check node_online(nid) before calling kmalloc_node(nid) and friends,
>> otherwise it may cause invalid memory access as below.
>
> So complete and full NAK on this. This is a workaround for a fucked in
> the head BIOS. If you're going to do a work around for that they should
> live in arch/ space, not in core code.
>
> The code in question is nearly 7 years old (2.6.24), which leads me to
> believe it works just fine for (regular) memory less nodes as I've not
> had complaints about it before.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2014-04-30 4:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 2:48 [Bugfix v2] sched: fix possible invalid memory access caused by CPU hot-addition Jiang Liu
2014-04-28 7:09 ` Peter Zijlstra
2014-04-30 4:26 ` Jiang Liu [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=53607B7D.6050205@linux.intel.com \
--to=jiang.liu@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rientjes@google.com \
--cc=tony.luck@intel.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