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

Andrea Righi
2026-04-28T13:17:11Z

Hi Peter,

On Tue, Apr 28, 2026 at 01:50:17PM +0200, Peter Zijlstra wrote:
> 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.

Ah yes, indeed, I'll drop the lockdep_assert_irqs_disabled().

Thanks,
-Andrea