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

Linus Torvalds
2009-01-07T23:10:27Z

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