lkml.org 
[lkml]   [2009]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -v7][RFC]: mutex: implement adaptive spinning
From
Date
On Thu, 2009-01-08 at 11:13 -0800, Linus Torvalds wrote:
>
> On Thu, 8 Jan 2009, Chris Mason wrote:
> >
> > It is less fair though, the 50 proc parallel creates had a much bigger
> > span between the first and last proc's exit time. This isn't a huge
> > shock, I think it shows the hot path is closer to a real spin lock.
>
> Actually, the real spin locks are now fair. We use ticket locks on x86.

> We _could_ certainly aim for using ticket locks for mutexes too, that
> might be quite nice.

Not really, ticket locks cannot handle a spinner going away - and we
need that here.

I've googled around a bit and MCS locks
(http://www.cs.rice.edu/~johnmc/papers/asplos91.pdf) look like a viable
way to gain fairness in our situation.



\
 
 \ /
  Last update: 2009-01-09 10:33    [W:0.984 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site