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

From: Linus Torvalds
Date: Wed Jan 07 2009 - 18:11:44 EST




On Wed, 7 Jan 2009, Peter Zijlstra wrote:
>
> Hmm, still wouldn't the spin_on_owner() loopyness and the above need
> that need_resched() check you mentioned to that it can fall into the
> slow path and go to sleep?

Yes, I do think that the outer loop at least should have a test for
need_resched().

Please take all my patches to be pseudo-code. They've neither been
compiled nor tested, and I'm just posting them in the hope that somebody
else will then do things in the direction I think is the proper one ;)

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/