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

From: David Woodhouse
Date: Mon Jul 09 2018 - 16:45:54 EST


On Mon, 2018-07-09 at 13:42 -0700, Paul E. McKenney wrote:
> On Mon, Jul 09, 2018 at 09:35:38PM +0100, David Woodhouse wrote:
>
>
> > On Mon, 2018-07-09 at 13:34 -0700, Paul E. McKenney wrote:
> > >Â
> > > So here are the possible code paths when .rcu_urgent_qs is set to true:
> > >Â
> > > 1.ÂÂÂÂÂÂA context switch will record the quiescent state and clear
> > > ÂÂÂÂÂÂÂÂ.rcu_urgent_qs. (The failure to do the clearing in current -rcu
> > > ÂÂÂÂÂÂÂÂfor PREEMPT builds is a performance bug that I need to fix.)
>
> > What if there's nothing else runnable and there is no actual context
> > switch?
>
> The scheduler invokes rcu_note_context_switch() before looking to see
> if there really will or won't be a context switch.
>
> I am sure that Peter will correct me if I am confused on this point. ;-)

Ah, OK. Yes, that looks correct. Thanks.

I'll give your patch a spin tomorrow, unless Marius beats me to it.

Attachment: smime.p7s
Description: S/MIME cryptographic signature