Re: [PATCH 1/6] sched/fair: Use guard(rcu) for sched_domain RCU sections

Peter Zijlstra
2026-04-28T11:50:25Z

On Tue, Apr 28, 2026 at 12:43:22PM +0200, Andrea Righi wrote:

> > and since this is only called from:
> >
> > sched_tick() /* IRQs disabled */
> > sched_balance_trigger()
> > nohz_balancer_kick()
> >
> > with IRQs disabled, we can get rid of that rcu_read_lock() entirely.
>
> Yeah, all makes sense. I'll update the patch dropping rcu_read_lock/unlock()
> completely.
>
> Is it worth adding a lockdep_assert_irqs_disabled()?

I think the rcu_dereference_all() thing will go scream if it doesn't
have any of IRQs/preempt/rcu disabled.