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

Steven Rostedt
2026-04-28T14:12:07Z

On Tue, 28 Apr 2026 14:03:59 +0530
K Prateek Nayak <kprateek.nayak@amd.com> wrote:

> > - if (rq->nr_running >= 2) {
> > - flags = NOHZ_STATS_KICK | NOHZ_BALANCE_KICK;
> > - goto out;
> > - }
> > -
> > - rcu_read_lock();
> > + guard(rcu)();
>
> 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.

Then we need to add a lockdep_assert_irqs_disabled() here too.

-- Steve