Re: [PATCH] smp: Suppress false DEBUG_PREEMPT warning in smp_call_on_cpu()
From: Sebastian Andrzej Siewior
Date: Wed Nov 05 2025 - 03:48:12 EST
On 2025-11-05 09:42:42 [+0100], Nam Cao wrote:
> >> +
> >> + /* suppress warnings from debug_smp_processor_id() */
> >
> > If you want to add a comment, what about something like
> >
> > /* Preserve not being migratable such as SMP variant does */
>
> Wouldn't it be a bit misleading? It's true that technically SMP variant
> is not migratable, but that's because it is a per-cpu thread, not
> because of migrate_disable(). To me, the comment sounds like that there
> is also a migrate_disable() in SMP variant.
A per-cpu thread ensures that the control flow can not migrate to
another CPU. This is also what stops debug_smp_processor_id() warnings
from work invoked from queue_work_on() vs queue_work().
> Nam
Sebastian