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

From: Peter Zijlstra
Date: Mon Jul 09 2018 - 09:02:41 EST


On Mon, Jul 09, 2018 at 02:55:16PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 09, 2018 at 05:34:57AM -0700, Paul E. McKenney wrote:
> > But KVM defeats this by checking need_resched() before invoking
> > cond_resched().
>
> That's not wrong or even uncommon I think.

In fact, I think we recently put that pattern in crypto code in order to
break up very long kernel_fpu sections.

Note that you also 'broke' cond_resched_lock() as that no longer matches
cond_resched().