From: Shaohui Zheng <shaohui.zheng@intel.com>
To: Paul Mundt <lethal@linux-sh.org>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, ak@linux.intel.com,
fengguang.wu@intel.com, haicheng.li@linux.intel.com,
shaohui.zheng@linux.intel.com
Subject: Re: [RFC,5/7] NUMA hotplug emulator
Date: Tue, 18 May 2010 17:03:00 +0800 [thread overview]
Message-ID: <20100518090300.GA26178@shaohui> (raw)
In-Reply-To: <20100514054928.GC12002@linux-sh.org>
On Fri, May 14, 2010 at 02:49:28PM +0900, Paul Mundt wrote:
> On Thu, May 13, 2010 at 08:14:57PM +0800, Shaohui Zheng wrote:
> > hotplug emulator: support cpu probe/release in x86
> >
> > Add cpu interface probe/release under sysfs for x86. User can use this
> > interface to emulate the cpu hot-add process, it is for cpu hotplug
> > test purpose. Add a kernel option CONFIG_ARCH_CPU_PROBE_RELEASE for this
> > feature.
> >
> > This interface provides a mechanism to emulate cpu hotplug with software
> > methods, it becomes possible to do cpu hotplug automation and stress
> > testing.
> >
> At a quick glance, is this really necessary? It seems like you could
> easily replace most of this with a CPU notifier chain that takes care of
> the node handling. See for example how ppc64 manages the CPU hotplug/numa
> emulation case in arch/powerpc/mm/numa.c. arch_register_cpu() just looks
> like some topology hack for ACPI, it would be nice not to perpetuate that
> too much.
Paul,
When we reivew the possible solutions for the emulator, we already do some researching
for ppc hotplug interface, I did not has ppc background, so it is hard for me to understand
all the details, but we get clues indeed, so you see the emulator today.
We are *NOT* expecting to find simple way to probe a CPU, we are trying to emulate the
behavior with software methods, we expect the same result when we do same operation on real
hardware and emualtor. That is the reason why we did not selelct CPU notifier chain, you can
see the CPU probe process is almost the same with CPU physical hot-add, the only difference
is that some functions are replaced with a '_emu' suffix, these '_emu' function has the same
function with the old one, but it does not refer to any acpi_handle data since the hot-add
event is fake.
for exmaple:
register_cpu & register_cpu_emu
arch_register_cpu & arch_register_cpu_emu
acpi_map_lsapic & acpi_map_lsapic_emu
the nid and apic_id are parsed from the acpi_handle, but for a fake hot-add, we does not
has such data, so we delete the parser code and replace them with a parameter.
I believe you method can success probe a CPU, but it is obvious different with the CPU hot-add
process, it has the different behavior with the real hardware, it is not expect. that is the failure
of the emulation.
ppc does not care about the ACPI data, that is the reason why it seems to be simple.
--
Thanks & Regards,
Shaohui
--
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>
next prev parent reply other threads:[~2010-05-18 9:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 12:14 [RFC,5/7] NUMA hotplug emulator Shaohui Zheng
2010-05-14 5:49 ` Paul Mundt
2010-05-18 9:03 ` Shaohui Zheng [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-05-13 11:56 Shaohui Zheng
2010-05-07 14:11 ` Pavel Machek
2010-05-16 17:45 ` Paul E. McKenney
2010-05-17 2:42 ` Haicheng Li
2010-05-17 3:37 ` Shaohui Zheng
2010-05-17 9:39 ` Andi Kleen
2010-05-17 9:38 ` Andi Kleen
2010-05-13 12:11 ` Jean Delvare
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=20100518090300.GA26178@shaohui \
--to=shaohui.zheng@intel.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=fengguang.wu@intel.com \
--cc=haicheng.li@linux.intel.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shaohui.zheng@linux.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;
as well as URLs for NNTP newsgroup(s).