[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200608291256.54665.ak@suse.de>
Date:	Tue, 29 Aug 2006 12:56:54 +0200
From:	Andi Kleen <ak@...e.de>
To:	David Howells <dhowells@...hat.com>
Cc:	Nick Piggin <nickpiggin@...oo.com.au>,
	Arjan van de Ven <arjan@...radead.org>,
	Dong Feng <middle.fengdong@...il.com>,
	Paul Mackerras <paulus@...ba.org>,
	Christoph Lameter <clameter@....com>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: Why Semaphore Hardware-Dependent?
On Tuesday 29 August 2006 12:05, David Howells wrote:
>Because i386 (and x86_64) can do better by using XADDL/XADDQ.
x86-64 has always used the spinlock based version.
> On i386, CMPXCHG also ties you to what registers you may use for what to some
> extent. 
We've completely given up these kinds of micro optimization for spinlocks,
which are 1000x as critical as rwsems.  And nobody was able to benchmark
a difference.
It is very very likely nobody could benchmark a difference on rwsems either.
While I'm sure it's an interesting intellectual exercise to do these
advanced rwsems it would be better for everybody else to go for a single 
maintainable C implementation.
-Andi
-
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