Re: [PATCH 1/5] sched/fair: Drop redundant RCU read lock in NOHZ kick path
From: K Prateek Nayak
Date: Tue Apr 28 2026 - 12:55:04 EST
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@xxxxxxx>
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
Thank you for cleaning these bits up. Feel free to include:
Reviewed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
--
Thanks and Regards,
Prateek