From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Denis Kirjanov <kda@linux-powerpc.org>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Milton Miller <miltonm@us.ibm.com>,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit.
Date: Tue, 2 Feb 2016 20:31:48 +0530 [thread overview]
Message-ID: <56B0C4DC.7070909@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAOJe8K2OpwYwVaG5nT-H8wCw8HbTEyE1zejZCO-MDh70+8J+xg@mail.gmail.com>
On 02/02/2016 07:28 PM, Denis Kirjanov wrote:
> On 2/1/16, Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>>
>> The kernel boot parameter 'nr_cpus=' allows one to specify number of
>> possible cpus in the system. In the normal scenario the first cpu (cpu0)
>> that shows up is the boot cpu and hence it gets covered under nr_cpus
>> limit.
>>
>> But this assumption will be broken in kdump scenario where kdump kenrel
>> after a crash can boot up on an non-zero boot cpu. The paca structure
>> allocation depends on value of nr_cpus and is indexed using logical cpu
>> ids. This definetly will be an issue if boot cpu id > nr_cpus
> And what happend in this case? Have you tried it out?
Yes I have. It results into memory corruption when
set_hard_smp_processor_id(boot_cpu_id,..) is called from
early_init_dt_scan_cpus() and then kernel fails to boot. Nothing shows
up in console and system hangs forever.
You can easily reproduce this by configuring kdump service to use
'nr_cpus=1' instead of 'maxcpus=1' and then trigger system crash from
any cpu other than 0
e.g. $ taskset -c 10 echo c > /proc/sysrq-trigger
Thanks,
-Mahesh.
prev parent reply other threads:[~2016-02-02 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 17:17 [PATCH] ppc64 boot: Wait for boot cpu to show up if nr_cpus limit is about to hit Mahesh J Salgaonkar
2016-02-01 18:35 ` kbuild test robot
2016-02-02 13:58 ` Denis Kirjanov
2016-02-02 15:01 ` Mahesh Jagannath Salgaonkar [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=56B0C4DC.7070909@linux.vnet.ibm.com \
--to=mahesh@linux.vnet.ibm.com \
--cc=anton@samba.org \
--cc=hbathini@linux.vnet.ibm.com \
--cc=kda@linux-powerpc.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=miltonm@us.ibm.com \
--cc=mpe@ellerman.id.au \
/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).