mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: paulmck@kernel.org, Borislav Petkov <bp@alien8.de>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH v2] x86/nmi: Enable panic() when NMI handler runs too long
Date: Tue, 20 Oct 2026 09:45:48 -0700	[thread overview]
Message-ID: <d8a05f9e-42ac-4c19-8713-558e1f002bd0@intel.com> (raw)
In-Reply-To: <5182974b-500a-4076-b9a1-5c67dded8380@paulmck-laptop>

On 10/20/26 09:15, Paul E. McKenney wrote:
>>> +	toolong_nmi_panic= [X86]
>>> +			Cause a panic upon return from an NMI handler
>>> +			that took longer than the specified number
>>> +			of milliseconds.  The default value of zero
>>> +			suppresses these panics.
>> Cause a panic after an NMI?!
> When the NMI handler runs for more than ten seconds, life is hard anyway.
> And no, these were not bugs in the several affected NMI handlers themselves.
> 
>> Oh boy, is this trying to solve a Meta fleet problem and you're thinking, why
>> not upstream it too?
>>
>> Because I fail to use the usefulness of this...
> I might be wrong, but I doubt that Meta's fleet is the only place where
> such bugs appear.  😉

Yeah, I once upon a time had a bunch of problems with NMIs taking
forever to run. In my case, it was some actually wonky firmware, but
differentiating the broken firmware from NMI handlers just being slow is
what motivated the existing "took too long to run" message next to which
you added the nmi_panic().

That said, I'd much prefer something more generic than something
NMI-specific.

Would the systems that set toolong_nmi_panic=1 also set panic_on_warn=1?
Are there any other "extra" panics that these systems also find useful?

I'm kinda curious if, for instance:

	hung_task_panic=1
or
	softlockup_panic=1

would also panic() these systems.

      reply	other threads:[~2026-10-20 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19  0:17 [PATCH] " Paul E. McKenney
2026-10-19 20:44 ` [PATCH v2] " Paul E. McKenney
2026-10-20  4:52   ` Borislav Petkov
2026-10-20 16:15     ` Paul E. McKenney
2026-10-20 16:45       ` Dave Hansen [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=d8a05f9e-42ac-4c19-8713-558e1f002bd0@intel.com \
    --to=dave.hansen@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@kernel.org \
    /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®