public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
To: Petr Tesarik <ptesarik@suse.cz>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	ebiederm@xmission.com, vgoyal@redhat.com,
	kumagai-atsushi@mxc.nes.nec.co.jp,
	Fenghua Yu <fenghua.yu@intel.com>
Subject: Re: [PATCH 0/2] kdump: Enter 2nd kernel with BSP for enabling multiple CPUs
Date: Fri, 19 Apr 2013 17:45:22 +0900	[thread overview]
Message-ID: <51710422.60704@jp.fujitsu.com> (raw)
In-Reply-To: <20130418134148.53704982@azariah.suse.cz>

(2013/04/18 20:41), Petr Tesarik wrote:
> On Mon, 16 Apr 2012 11:21:28 +0900
> HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com> wrote:
>
>> Currently, booting up 2nd kernel with multiple CPUs fails in most
>> cases since it enters 2nd kernel with AP if the crash happens on the
>> AP. The problem is to signal startup IPI from AP to BSP. Typical
>> result of the operation I saw is the machine hanging during the 2nd
>> kernel boot.
>>
>> To solve this issue, always enter 2nd kernel with BSP. To do this, I
>> modify logic for shooting down CPUs. I use simple existing logic only
>> in this mechanism, not complicating crash path to machine_kexec().
>
> These patches looked pretty good. I seem to recall that Fenghua (from
> Intel) had an alternative solution for booting from AP. Unfortunately I
> can't find his mails in my kexec mailbox...
>
> Anyway, what's the latest upstream status?

It's still in experimental state.

The patch itself was nacked by Erick since switching the CPU that 
entered 2nd kenrel through NMI reduced reliability of kdump.

At the discussion of my 2nd patch set that tried to reset BSP flag at 
boot on the 2nd kernel, Erick suggested that BSP flag could be changed 
at runtime and then behaviour when INIT was received varied and first we 
should discuss how unsetting BSP flag affects system.

I'm now going in this direction and the patch I posted a month ago is:

[PATCH] x86, apic: Add unset_bsp parameter to unset BSP flag at boot time
https://lkml.org/lkml/2013/3/18/107

According to Fenghua, some kind of firmware assumes that BSP flag is 
being kept throughout system is running. I have yet to see difference of 
behaviour when unsetting BSP flag on top of the patch on my machine. I 
think this is system dependent and it might be better to assign each 
user to decide whether to unset BSP flag or not.

BTW, the work of software cpu hotplug for BSP by Fenghua is orthogonal 
to my case. His work is for system including firmware that is affected 
if BSP flag is unset and assumes healthy system that cpu#0 is always 
BSP. On the other hand, our case is for crash kernel and we can no 
longer assume cpu#0 is BSP and can no longer use NMI to wake up other 
CPUs since we cannot use logic that depends on the state of CPUs 
sleeping in the 1st kernel.

-- 
Thanks.
HATAYAMA, Daisuke


      reply	other threads:[~2013-04-19  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16  2:21 [PATCH 0/2] kdump: Enter 2nd kernel with BSP for enabling multiple CPUs HATAYAMA Daisuke
2012-04-16  2:21 ` [PATCH 1/2] Introduce crash ipi helpers to wait for APs to stop HATAYAMA Daisuke
2012-04-16  2:21 ` [PATCH 2/2] Enter 2nd kernel with BSP HATAYAMA Daisuke
2012-04-23 10:46   ` Andi Kleen
2012-04-23 10:49   ` Andi Kleen
2012-04-24  2:05     ` HATAYAMA Daisuke
2012-04-24  3:04       ` Yu, Fenghua
2012-04-24  8:04       ` Andi Kleen
2012-04-24 10:46         ` Eric W. Biederman
     [not found] ` <beaa8ade-b7af-4e71-b4e0-a418ceb83f1e@email.android.com>
2012-04-16  6:40   ` [PATCH 0/2] kdump: Enter 2nd kernel with BSP for enabling multiple CPUs HATAYAMA Daisuke
2012-05-14  8:29 ` Cong Wang
2013-04-18 11:41 ` Petr Tesarik
2013-04-19  8:45   ` HATAYAMA Daisuke [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=51710422.60704@jp.fujitsu.com \
    --to=d.hatayama@jp.fujitsu.com \
    --cc=ebiederm@xmission.com \
    --cc=fenghua.yu@intel.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ptesarik@suse.cz \
    --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