Re: [PATCH -v7][RFC]: mutex: implement adaptive spinning

Linus Torvalds
2009-01-08T16:12:34Z

On Thu, 8 Jan 2009, Peter Zijlstra wrote:
>
> This was done because the interaction between trylock_slowpath and that
> -1000 state hurt my head.

Yeah, it was a stupid hacky thing to avoid the "list_empty()", but doing
it explicitly is fine (we don't hold the lock, so the list isn't
necessarily stable, but doing "list_empty()" is fine because we don't ever
dereference the pointers, we just compare the pointers themselves).

I shouldn't have done that hacky thing, it wasn't worth it.

Linus