Re: Why Semaphore Hardware-Dependent?

Andi Kleen
2006-08-27T21:39:14Z

On Sunday 27 August 2006 23:05, Christoph Lameter wrote:
> On Sun, 27 Aug 2006, Andi Kleen wrote:
>
> > rwsems don't -- there are two flavours: a generic spinlock'ed one and a
> > complicated atomic based one that only works on some architectures.
> > As far as I know nobody has demonstrated a clear performance increase
> > from the first so it might be possible to switch all to the generic
> > implementation.
>
> Yup that would be the major issue.I'd be interested to see some tests in
> that area.

x86-64 always uses the spinlocked version (vs i386 using the atomic one)
and I haven't heard of anybody complaining.

-Andi