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] [day] [month] [year] [list]
Date:	Mon, 11 Dec 2006 05:03:34 +0100
From:	Nick Piggin <npiggin@...e.de>
To:	David Howells <dhowells@...hat.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-arch@...r.kernel.org, Linus Torvalds <torvalds@...l.org>,
	Andrew Morton <akpm@...l.org>
Subject: Re: [patch][rfc] rwsem: generic rwsem

On Fri, Dec 08, 2006 at 01:58:42PM +0000, David Howells wrote:
> Nick Piggin <npiggin@...e.de> wrote:
> 
> > > Look at how the counter works in the XADD-based version.  That's the way
> > > it is *because* I'm using XADD.  That's quite limiting.
> > 
> > Not really. ll/sc architectures "emulate" xadd the same as they would
> > emulate a spinlock. There is nothing suboptimal about it.
> 
> Yes, really.  You've missed the point entirely.  Look at *how* the counter
> *works*.

OK, I've looked but I can't see how you would make it more optimal on
an ll/sc architecture. The atomic_add_return variant has no more atomic
or barrier operations than the spinlock one, and it has less loads and
branches.
-
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