Re: [PATCH v2 5/6] locking/pvqspinlock: Opportunistically defer kicking to unlock time

Peter Zijlstra
2015-07-16T05:49:19Z

On Wed, Jul 15, 2015 at 10:18:35PM -0400, Waiman Long wrote:
> On 07/15/2015 06:03 AM, Peter Zijlstra wrote:

> >*groan*, so you complained the previous version of this patch was too
> >complex, but let me say I vastly preferred it to this one :/
>
> I said it was complex as maintaining a tri-state variable needed more
> thought than 2 bi-state variables. I can revert it back to the tri-state
> variable as doing an unconditional kick in unlock simplifies the code at
> pv_wait_head().

Well, your state space isn't shrunk, you just use more variables and I'm
not entirely sure that actually matters.

What also doesn't help is that mixing with the kicking code.