Re: [PATCH v8 01/14] smp: Disable preemption explicitly in __csd_lock_wait()

From: Thomas Gleixner

Date: Fri Jun 26 2026 - 09:38:51 EST


On Tue, Jun 16 2026 at 19:11, Chuyi Zhou wrote:
> The latter patches will enable preemption before csd_lock_wait(), which
> could break csdlock_debug. Because the slice of other tasks on the CPU may
> be accounted between ktime_get_mono_fast_ns() calls, disable preemption
> explicitly in __csd_lock_wait(). This is a preparation for the next
> patches.

This is not really a comprehensible change log. See:

https://docs.kernel.org/process/maintainer-tip.html#changelog

And if you follow the structure given there, i.e. context, problem,
solution then you end up with something like:

The CSD debugging code in__csd_lock_wait() must be invoked with
preemption disabled. It is invoked from the various smp function call
mechanisms which guarantee that.

Disabling preemption throughout the smp function call procedure can
induce large latencies, which can be avoided for certain scenarios by
enabling preemption earlier. But that would invoke __csd_lock_wait()
with preemption enabled.

To prepare for that explicitly disable preemption in __csd_lock_wait()
itself.

See?

Thanks,

tglx