Thread (161 messages) 161 messages, 8 authors, 2025-04-24

Re: [PATCH v4 01/39] task_work: Fix TWA_NMI_CURRENT error handling

From: Peter Zijlstra <peterz@infradead.org>
Date: 2025-01-23 22:19:13
Also in: linux-perf-users, linux-toolchains, lkml

On Thu, Jan 23, 2025 at 09:15:09AM -0800, Josh Poimboeuf wrote:
On Thu, Jan 23, 2025 at 09:14:03AM +0100, Peter Zijlstra wrote:
quoted
On Wed, Jan 22, 2025 at 12:47:20PM -0800, Josh Poimboeuf wrote:
quoted
What exactly do you mean by "NMI like"?  Is it because a #DB might be
basically running in NMI context, if the NMI hit a breakpoint?
No, #DB, #BP and such are considered NMI (and will have in_nmi() true)
because they can trigger anywhere, including sections where IRQs are
disabled.
So:

  - while exceptions are technically not NMI, they're "NMI" because they
    can occur in NMI or IRQ-disabled regions

  - such "NMI" exceptions can be preempted by NMIs and "NMIs"

  - NMIs can be preempted by "NMIs" but not NMIs (except in entry code!)

... did I get all that right?  Not subtle at all!
Yeah, sounds about right :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help