[RFC PATCH v2 03/13] sched: Split preempt-count bookkeeping from raw updates
Karl Mehltretter
kmehltretter at gmail.com
Sat Oct 31 04:10:45 PDT 2026
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
More information about the linux-arm-kernel
mailing list