lkml.org 
[lkml]   [2008]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Introduce down_try() so we can move away from down_trylock()
On Sun, Aug 03, 2008 at 06:33:30PM +1000, Rusty Russell wrote:
> On Saturday 02 August 2008 03:26:33 Linus Torvalds wrote:
> > Also, all actual _users_ of down_trylock() seem to be prime candidates for
> > turning into mutexes anyway - with the _possible_ exception of the console
> > semaphore which has problems with the mutex debugging code.
>
> And Willy is working on that. Still. Frankly, I gave up waiting.

It's low-priority for me. SSDs are much more exciting.

> > Guys, some quality control and critical thinking, please.
>
> Good idea. If we'd done that we wouldn't have the down_trylock() brain
> damage.

I believe down_trylock() came first. spin_trylock() was then the one
that was gratuitously different and mutex_trylock() decided to follow
the spinning semantics rather than the sleeping semantics. But yeah,
whatever, big mess. I'm not convinced down_try() is an improvement.

But I bet we could have got rid of most of the users of down_trylock()
in the time that's been spent wanking about down_try(). Hey, let's make
it return bool! Hey, let's argue about the name! Hey, let's argue
about the documentation!

Sometimes the bikeshed needs to be bulldozed, not given another lick of
paint.

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."


\
 
 \ /
  Last update: 2008-08-03 15:11    [W:1.849 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site