[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -v5][RFC]: mutex: implement adaptive spinning
[resend: restore CC list]

>>> Linus Torvalds <> 01/07/09 6:33 PM >>>

>On Wed, 7 Jan 2009, Steven Rostedt wrote:
>> What would be interesting is various benchmarks against all three.
>> 1) no mutex spinning.
>> 2) get_task_struct() implementation.
>> 3) spin_or_sched implementation.
>One of the issues is that I cannot convince myself that (2) is even
>necessarily correct. At least not without having all cases happen inder
>the mutex spinlock - which they don't. Even with the original patch, the
>uncontended cases set and cleared the owner field outside the lock.

Yeah, you are right (see my last post). Without the cmpxchg trickery
(*) on the owner field (like we have in -rt) with the pending bits, (2)
cannot work.

(*) For what its worth, I am impressed with the brilliance of the
cmgxchg fast path stuff in the rtmutex code. Whoever came up with that,
my hat is off to you.


[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2009-01-08 04:27    [W:0.322 / U:2.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site