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

From: Paul E. McKenney
Date: Mon Jul 09 2018 - 10:52:34 EST


On Mon, Jul 09, 2018 at 04:43:38PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 09, 2018 at 07:29:32AM -0700, Paul E. McKenney wrote:
>
> > OK, so here are our options:
> >
> > 1. Add the RCU conditional to need_resched(), as David suggests.
> > Peter has concerns about overhead.
>
> Not only overhead, its plain broken, because:
>
> 1) we keep preemption state in other places too
> 2) we check need_resched() in asm

Fair points. And yes, the various asm checks and transitions have
made their presence known to me in other contexts of late. :-/

So what would you suggest?

Thanx, Paul