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: <20070719204102.7b82692d.akpm@linux-foundation.org>
Date:	Thu, 19 Jul 2007 20:41:02 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Nick Piggin <nickpiggin@...oo.com.au>
Cc:	David Howells <dhowells@...hat.com>, torvalds@...ux-foundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] AFS: Fix file locking

On Wed, 18 Jul 2007 15:56:53 +1000 Nick Piggin <nickpiggin@...oo.com.au> wrote:

> Andrew Morton wrote:
> > On Tue, 17 Jul 2007 13:47:32 +0100
> > David Howells <dhowells@...hat.com> wrote:
> > 
> > 
> >>+	if (type == AFS_LOCK_READ &&
> >>+	    vnode->flags & (1 << AFS_VNODE_READLOCKED)) {
> > 
> > 
> > Here we use
> > 
> > 	vnode->flags & (1 << foo)
> > 
> > 
> >>+		set_bit(AFS_VNODE_LOCKING, &vnode->flags);
> > 
> > 
> > and elsewhere we use set_bit(foo, &vnode->flags) and clear_bit()
> > 
> > This is a bit strange.  Does the open-coded bit-test have any performance
> > benefit on any architecture?  Not on x86 at least, afaik.
> 
> It uses locked operations on x86, but you can use __set_bit instead
> (which should always be at least as efficient as the C version).

I said "bit-test".  ie: test_bit().  That doesn't use a locked operation.
-
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