Re: [RFC] Make need_resched() return true when rcu_urgent_qs requested

From: Paul E. McKenney
Date: Mon Jul 23 2018 - 08:22:39 EST


On Mon, Jul 23, 2018 at 10:08:59AM +0200, David Woodhouse wrote:
> On Thu, 2018-07-19 at 10:09 -0700, Paul E. McKenney wrote:
> >
> > Of course, the real reason for the lack of fault on your part will not
> > because I believe I found the bug elsewhere, but instead because I will
> > be dropping your patch (and mine as well) on Frederic's advice.  ;-)
>
> You're keeping the need_resched() one though?

Yes. This the current commit in -rcu (which will change when I rebase
onto v4.19-rc1, if not earlier):

fcf0407e6e63 ("rcu: Make need_resched() respond to urgent RCU-QS needs")

> And we are still left with the fact that CONTEXT_TRACKING_FORCE is
> making the existing code in guest_enter_irqoff() do the wrong thing for
> !NO_HZ_FULL. But in fact the rcu_virt_note_context_switch() there is
> completely redundant now we fixed need_resched(), so can be dropped,
> leaving only the rcu_user_enter/exit calls for the NO_HZ_FULL case?

I am not yet convinced that we know exactly the right thing to be
doing for guest OSes for either value of NO_HZ_FULL, much less that
we are actually doing it. ;-)

But what does your testing say?

Thanx, Paul