lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080803130737.GF26461@parisc-linux.org>
Date:	Sun, 3 Aug 2008 07:07:38 -0600
From:	Matthew Wilcox <matthew@....cx>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Paul Menage <menage@...gle.com>, linux-kernel@...r.kernel.org,
	"Randy.Dunlap" <rdunlap@...otime.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [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."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ