On Fri, Nov 30, 2018 at 05:34:29PM +0000, Will Deacon wrote: > Hi all, > > This is version two of the patches I originally posted here: > > > http://lkml.kernel.org/r/[email protected] > > The only change since v1 is that __preempt_count_dec_and_test() now > reloads the need_resched flag if it initially saw that it was set. This > resolves the issue spotted by Peter, where an IRQ coming in during the > decrement can cause a reschedule to be missed.
Yes, I think this one will work, so: Acked-by: Peter Zijlstra (Intel) <[email protected]> However, this leaves me wondering if the sequence is actually much better than what you had? I suppose there's a win due to cache locality -- you only have to load a single line -- but I'm thinking that on pure instruction count, you're not actually winning much.

