From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: fengguang.wu@intel.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, jerry.hoemann@hp.com, bp@alien8.de,
ebiederm@xmission.com, akpm@linux-foundation.org,
hpa@linux.intel.com, jingbai.ma@hp.com
Subject: Re: [PATCH v4 0/3] x86, apic, kexec: Add disable_cpu_apic kernel parameter
Date: Thu, 24 Oct 2013 10:42:12 +0900 [thread overview]
Message-ID: <52687AF4.5090404@jp.fujitsu.com> (raw)
In-Reply-To: <20131023155127.GA17437@redhat.com>
(2013/10/24 0:51), Vivek Goyal wrote:
> On Wed, Oct 23, 2013 at 09:05:06AM +0900, HATAYAMA Daisuke wrote:
>
> [..]
>>> Do you literally mean a human at each boot will have to configure
>>> the kdump configuration files for passing disable_cpu_apic?
>>> Or do you envision the setting of disable_cpu_apic being put into
>>> the kdump initialization scripts?
>>>
>>> thanks
>>>
>>> Jerry
>>
>> Nearer to the former case, but this is not what a human should do. It's
>> a cumbersome task. I think, on fedora/RHEL system for example, kdump
>> service should check at each boot automatically.
>
> Hi Hatayama,
>
> So what information should I look for to prepare disable_cpu_apic=X in
> kdump script?
>
> Is BSP processor info exported to user space somewhere? Or assuming that
> processor 0 is BSP and corresponding apicid should be disabled in kdump
> kernel is good enough?
>
Yes, this patch set assumes that the processor 0 is BSP and there's no
other BSP. Because this patch cares about only one BSP processor,
the disabled_cpu_apicid variable has unsigned int, not mask.
I think this assumption is reasonable since doing it rigorously requires
additional processing between 1st and 2nd kernels just as I explained in
previous mail.
> I am looking at /proc/cpuinfo and following 3 fields seem interesting.
>
> processor: 0
> apicid : 0
> initial apicid : 0
>
> What's the difference between apicid and "initial apicid". I guess
> initial apicid reflects the apicid number as set by firmware and then
> kernel can overwrite it and new number would be reflected in "apicid"?
>
> If that's the case, then I guess we should be looking at "apicid" of
> processor "0" and set that in disable_cpu_apic? Because that's the
> number kdump kernel boot should see in apic upon boot.
>
Yes, that's fully correct, and please see 10.4.6 Local APIC ID in Intel SPG
for details.
BTW, we can use cpuid instruction in user-space, too. It might be more
flexible to use cpuid than looking up /proc/cpuinfo.
Also, there's one corner case that if we hot-remove cpu0, we cannot
look up /proc/cpuinfo to get cpu0 information since /proc/cpunifo displays
*online* cpus only. We cannot use even cpuid instruction for offline cpu.
So, to address this corner case, we need to prepare new interface to see
cpu0 initial apicid which is always available.
My idea is for example to introduce the following file in sysfs:
/sys/devices/system/cpu/cpu0/initial_apicid
Under the current implementation, cpu0 hot-remove is software one and kernel
must start with cpu0 in boot time. It's enough to assign the value of initial
APIC ID in the boot time. The one in boot_cpu_data?
--
Thanks.
HATAYAMA, Daisuke
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-10-24 1:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 15:01 [PATCH v4 0/3] x86, apic, kexec: Add disable_cpu_apic kernel parameter HATAYAMA Daisuke
2013-10-22 15:01 ` [PATCH v4 1/3] x86, apic: Don't count the CPU with BP flag from MP table as booting-up CPU HATAYAMA Daisuke
2013-11-08 16:08 ` Vivek Goyal
2013-11-11 2:52 ` HATAYAMA Daisuke
2013-11-11 16:52 ` Vivek Goyal
2013-11-12 0:40 ` HATAYAMA Daisuke
2013-11-12 9:58 ` HATAYAMA Daisuke
2013-10-22 15:01 ` [PATCH v4 2/3] x86, apic: Add disable_cpu_apicid kernel parameter HATAYAMA Daisuke
2013-10-22 15:01 ` [PATCH v4 3/3] Documentation, x86, apic, kexec: " HATAYAMA Daisuke
[not found] ` <20131022220803.GA32387@anatevka.fc.hp.com>
2013-10-23 0:05 ` [PATCH v4 0/3] x86, apic, kexec: Add disable_cpu_apic " HATAYAMA Daisuke
2013-10-23 15:51 ` Vivek Goyal
2013-10-24 1:42 ` HATAYAMA Daisuke [this message]
2013-10-25 11:05 ` Petr Tesarik
2013-10-29 0:53 ` HATAYAMA Daisuke
2013-10-29 7:39 ` Petr Tesarik
2013-10-24 5:50 ` Eric W. Biederman
[not found] ` <20131031005812.GA15459@anatevka.fc.hp.com>
2013-10-31 4:43 ` HATAYAMA Daisuke
2013-10-31 13:27 ` Vivek Goyal
2013-11-01 0:31 ` Simon Horman
2013-11-04 7:08 ` HATAYAMA Daisuke
2013-10-29 14:21 ` Baoquan He
2013-10-30 0:44 ` HATAYAMA Daisuke
2013-10-30 6:06 ` Baoquan He
2013-10-30 9:48 ` HATAYAMA Daisuke
2013-10-30 15:27 ` Baoquan He
2013-11-08 3:30 ` Baoquan He
2013-11-08 4:13 ` HATAYAMA Daisuke
[not found] ` <20131106190232.GA28119@anatevka.fc.hp.com>
2013-11-11 4:49 ` HATAYAMA Daisuke
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=52687AF4.5090404@jp.fujitsu.com \
--to=d.hatayama@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=ebiederm@xmission.com \
--cc=fengguang.wu@intel.com \
--cc=hpa@linux.intel.com \
--cc=jerry.hoemann@hp.com \
--cc=jingbai.ma@hp.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.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