Re: [RFC PATCH 03/19] sched/fair: Use rq->nohz_tick_stopped in update_nohz_stats()
From: K Prateek Nayak
Date: Wed Sep 24 2025 - 21:49:09 EST
Hello Shrikanth,
On 9/25/2025 1:47 AM, Shrikanth Hegde wrote:
>
>
> On 9/4/25 9:44 AM, K Prateek Nayak wrote:
>> "rq->nohz_tick_stopped" always follows the state of CPU on
>> "nohz.idle_cpus_mask". Use the local rq indicator instead of checking
>> for the CPU on the "idle_cpus_mask".
>>
>> Use READ_ONCE() and WRITE_ONCE() for "rq->nohz_tick_stopped" to ensure
>> update_nohz_stats() always sees the latest value.
>>
>
> Is this ever called by remote CPU? If not, is READ/WRITE ONCE is necessary?
Patch 6 looks at "rq->nohz_tick_stopped" to correct the idle mask in the
sched domain rebuild path which is done from a remote CPU.
--
Thanks and Regards,
Prateek