From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>,
Tony Luck <tony.luck@intel.com>, Vivek Goyal <vgoyal@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Junichi Nomura <j-nomura@ce.jp.nec.com>,
Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Subject: Re: [PATCH 1/2] x86: mce: kdump: use under_crashdumping to turn off MCE in all CPUs together
Date: Wed, 25 Feb 2015 00:54:53 +0000 [thread overview]
Message-ID: <20150225005453.GA28870@hori1.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20150224095616.GB3420@pd.tnic>
On Tue, Feb 24, 2015 at 10:56:16AM +0100, Borislav Petkov wrote:
> On Tue, Feb 24, 2015 at 08:15:35AM +0000, Naoya Horiguchi wrote:
> > Let me update my explanation about the problem. I wrote the description about
> > race window of nmi shoot down threads. That's not wrong, but that's only the
> > part of the problem. The more suitable description is that all "shot down"
> > CPUs keep MCE enabled (disable_local_APIC() doesn't stop it) after entering
> > infinite loop of cpu_relax(), so any MCE event causes kernel panic due to
> > synchronization timeout whenever after the 2nd kernel launches on the crashing
> > CPU (where the CPU don't run do_machine_check(), but the other CPUs do).
>
> Ok, now we're getting closer.
>
> So, I'm thinking you want to disable MCA on all cores going offline
> as part of the work done in crash_nmi_callback(). And off the top
> of my head, it should be something what mcheck_cpu_init() and
> __mcheck_cpu_init_generic() in particular does but in reverse.
>
> I'd even venture a guess and say that clearing CR4.MCE should be enough
> but I *think* that doesn't prevent errors from being logged. Just to be
> extra sure, you should clear MCG_CTL bits too. It all depends on what
> exactly you want to do.
Comparing with setting tolerant to 3, clearing CR4.MCE and MCG_CTL has one
benefit that we can also disable reporting to userspace.
do_machine_check() calls mce_report_event() which makes the mcelog process
read the log from /dev/mcelog and write it to storage even when tolerant == 3,
but we can't expect that works correctly under kdump context.
So keeping log data on /dev/mcelog buffer and letting them included in the
crashdump looks better to me.
Thanks,
Naoya Horiguchi
prev parent reply other threads:[~2015-02-25 0:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 9:12 Naoya Horiguchi
2015-02-23 9:12 ` [PATCH 2/2] x86: mce: comment about MCE synchronization timeout on definition of tolerant Naoya Horiguchi
2015-02-23 9:27 ` [PATCH 1/2] x86: mce: kdump: use under_crashdumping to turn off MCE in all CPUs together Borislav Petkov
2015-02-23 13:01 ` Naoya Horiguchi
2015-02-23 13:58 ` Borislav Petkov
2015-02-23 15:41 ` Naoya Horiguchi
2015-02-23 17:06 ` Borislav Petkov
2015-02-24 8:15 ` Naoya Horiguchi
2015-02-24 9:56 ` Borislav Petkov
2015-02-24 18:20 ` Luck, Tony
2015-02-24 18:40 ` Borislav Petkov
2015-02-24 18:47 ` Luck, Tony
2015-02-24 21:19 ` Borislav Petkov
2015-02-25 0:54 ` Naoya Horiguchi [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=20150225005453.GA28870@hori1.linux.bs1.fc.nec.co.jp \
--to=n-horiguchi@ah.jp.nec.com \
--cc=bp@alien8.de \
--cc=j-nomura@ce.jp.nec.com \
--cc=k-ueda@ct.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nao.horiguchi@gmail.com \
--cc=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®