On 7/11/2025 12:30 PM, Joel Fernandes wrote:
>
>
> On 7/10/2025 8:00 PM, Paul E. McKenney wrote:
>> On Tue, Jul 08, 2025 at 10:22:21AM -0400, Joel Fernandes wrote:
>>> The check for irqs_were_disabled is redundant in
>>> rcu_unlock_needs_exp_handling() as the caller already checks for this.
>>> This includes the boost case as well. Just remove the redundant check.
>>
>> But in the very last "if" statement in the context of the last hunk of
>> this patch, isn't it instead checking for !irqs_were_disabled?
>>
>> Or is there something that I am missing that makes this work out OK?
>
> You are right, after going over all the cases I introduced a behavioral
> change.
>
> Say, irqs_were_disabled was false. And say we are RCU-boosted. needs_exp might
> return true now, but previously it was returning false. Further say, we are
> not
> in hardirq.
>
> New code will raise softirq, old code would go to the ELSE and just set:
> set_tsk_need_resched(current);
> set_preempt_need_resched();
>
> But preempt_bh_were_disabled that's why we're here.
>
> So we need to only set resched and not raise softirq, because the preempt
> enable
> would reschedule.
>
> Sorry I missed this, but unless this behavior is correct or needs further
> work,
> lets drop this patch. Thanks and kudos on the catch!
Btw, Neeraj, the related patch 3/7 should still be good for applying (which has
Paul's Review tag).
Thanks.