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

From: K Prateek Nayak

Date: Tue Apr 28 2026 - 08:15:43 EST


Hello Andrea,

On 4/28/2026 4:13 PM, Andrea Righi wrote:
>>> - 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.
>
> Yeah, all makes sense. I'll update the patch dropping rcu_read_lock/unlock()
> completely.
>
> Is it worth adding a lockdep_assert_irqs_disabled()?

Yes, that would be nice. Thank you!

--
Thanks and Regards,
Prateek