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

From: Linus Torvalds
Date: Thu Jan 08 2009 - 11:12:59 EST




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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/