Re: [PATCH 1/5] sched/fair: Drop redundant RCU read lock in NOHZ kick path

K Prateek Nayak
2026-04-28T16:29:39Z

Hello Andrea,

On 4/28/2026 8:11 PM, Andrea Righi wrote:
> nohz_balancer_kick() is reached from sched_balance_trigger(), which is
> called from sched_tick(). sched_tick() runs with IRQs disabled, so the
> additional rcu_read_lock/unlock() used around sched_domain accesses in
> this path is redundant. Rely on the existing IRQ-disabled context (and
> the rcu_dereference_all() checking) instead.

nit. Perhaps a small note like below in case there is a follow-up:

set_cpu_sd_state_idle() is called from idle entry path after the IRQs
have been disabled making the rcu_dereference_all() check sufficient.

>
> No functional change intended.
>
> Suggested-by: K Prateek Nayak <kprateek.nayak@amd.com>
> Signed-off-by: Andrea Righi <arighi@nvidia.com>

Thank you for cleaning these bits up. Feel free to include:

Reviewed-by: K Prateek Nayak <kprateek.nayak@amd.com>

--
Thanks and Regards,
Prateek