Re: [PATCH v3 04/12] smp: Use on-stack cpumask in smp_call_function_many_cond

From: Chuyi Zhou

Date: Wed Mar 18 2026 - 23:03:10 EST


Hi Sebastian,

在 2026/3/18 23:55, Sebastian Andrzej Siewior 写道:
> On 2026-03-18 12:56:30 [+0800], Chuyi Zhou wrote:
>> This patch use on-stack cpumask to replace percpu cfd cpumask in
>> smp_call_function_many_cond(). Note that when both CONFIG_CPUMASK_OFFSTACK
>> and PREEMPT_RT are enabled, allocation during preempt-disabled section
>> would break RT. Therefore, only do this when CONFIG_CPUMASK_OFFSTACK=n.
>> This is a preparation for enabling preemption during csd_lock_wait() in
>> smp_call_function_many_cond().
>
> You explained why we do this only for !CONFIG_CPUMASK_OFFSTACK but
> failed to explain why we need a function local cpumask. Other than
> preparation step. But this allocation looks pointless, let me look
> further…
>

OK. It might be better to explain here why we need an local cpumask.

Thanks.

>> Signed-off-by: Chuyi Zhou <zhouchuyi@xxxxxxxxxxxxx>
>> Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>
>
> Sebastian