Re: [RFC PATCH v2 03/13] sched: Split preempt-count bookkeeping from raw updates

From
Karl Mehltretter <hidden>
Date
2026-10-31 11:10:50
Also in
linux-doc, linux-rt-devel, linux-trace-kernel, lkml, llvm
Reply to
Peter Zijlstra, 2026-10-29
On Thu, Oct 29, 2026 at 10:32:19AM +0100, Peter Zijlstra wrote:
Urgh, so much crazy.

So WARNs in noinstr code are 'fine'. That is, they should not happen, if
they do, bad things have happened and we need the warning out ASAP, if
it takes the machine down, too bad. See the
instrumentation_{begin,end}() markers in x86 asm/bug.h.

But yes, the tracing needs to go. But moving that around should not be
this ugly and also, that will give you the opportunity to fix
preempt_{en,dis}able_notrace(), since they currently also skip the bound
checks.
Yes, that's a good direction.

I checked the call chain and DEBUG_LOCKS_WARN_ON() is already fine in
noinstr. arm64 just needs __always_inline on preempt_count() and
should_resched() so Clang doesn't outline them.

I will work on that.

Thanks,
Karl
Thread (16 messages) 16 messages, 2 authors, 3d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help