mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zeng Heng <zengheng4@huawei.com>
To: Baoquan He <bhe@redhat.com>, Peter Zijlstra <peterz@infradead.org>
Cc: <mingo@redhat.com>, <bp@alien8.de>, <jroedel@suse.de>,
	<vbabka@suse.cz>, <hpa@zytor.com>, <tglx@linutronix.de>,
	<eric.devolder@oracle.com>, <tiwai@suse.de>,
	<keescook@chromium.org>, <dave.hansen@linux.intel.com>,
	<linux-kernel@vger.kernel.org>, <x86@kernel.org>,
	<liwei391@huawei.com>, <xiexiuqi@huawei.com>,
	<kexec@lists.infradead.org>
Subject: Re: [PATCH v3] x86/kdump: Handle blocked NMIs interrupt to avoid kdump crashes
Date: Wed, 15 Feb 2023 11:05:11 +0800	[thread overview]
Message-ID: <abe55a65-1ab9-39ca-2cca-3190c6ba2e21@huawei.com> (raw)
In-Reply-To: <Y+wu5UJTzVIYrsbK@MiWiFi-R3L-srv>


在 2023/2/15 9:01, Baoquan He 写道:
> Add kexec list to CC.
>
> On 02/14/23 at 10:49am, Peter Zijlstra wrote:
>> On Tue, Feb 14, 2023 at 05:30:46PM +0800, Zeng Heng wrote:
>>
>>>> I never remember the shutdown paths -- do we force wipe the PMU
>>>> registers somewhere before this?
>>> I have checked the panic process, and there is no wipe operation for PMU
>>> registers,
>>>
>>> which causes the watchdog bites.
>>>
>>> Do you mean we should directly disable PMU registers instead of calling
>>> `iret_to_self` to
>>>
>>> consume blocked NMI interrupts ?
>> If you don't wipe the PMU, there will be many and continuous NMIs, a
>> single IRET-to-SELF isn't going to safe you.
>>
>> Anyway, I had a bit of a grep around and I find we have:
>>
>>    kernel/events/core.c:   register_reboot_notifier(&perf_reboot_notifier);
>>
>> which should end up killing all the PMU activity. Somewhere around there
>> there's also a CONFIG_KEXEC_CORE ifdef, so I'm thinking it gets called
>> on the panic->crash-kernel path too?
> No, reboot_notifier_list is only handled in kexec reboot/reboot path,
> please see kernel_restart_prepare() invocation. Kdump path only shutdown
> key component like cpu, interrupt controller.

I would replace iret_to_self() with perf_event_exit_cpu() in kdump shutdown

path (in native_machine_crash_shutdown()).


After test, I would send v4 later.

Thanks all,

Zeng Heng



      reply	other threads:[~2023-02-15  3:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02  1:40 Zeng Heng
2023-02-02  9:09 ` Peter Zijlstra
2023-02-14  9:30   ` Zeng Heng
2023-02-14  9:49     ` Peter Zijlstra
2023-02-15  1:01       ` Baoquan He
2023-02-15  3:05         ` Zeng Heng [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=abe55a65-1ab9-39ca-2cca-3190c6ba2e21@huawei.com \
    --to=zengheng4@huawei.com \
    --cc=bhe@redhat.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=eric.devolder@oracle.com \
    --cc=hpa@zytor.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.de \
    --cc=vbabka@suse.cz \
    --cc=x86@kernel.org \
    --cc=xiexiuqi@huawei.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®