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]
Date:	Thu, 7 Dec 2006 13:06:30 -0800
From:	Andrew Morton <akpm@...l.org>
To:	David Howells <dhowells@...hat.com>
Cc:	torvalds@...l.org, davem@...emloft.com, wli@...omorphy.com,
	matthew@....cx, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH 3/3] WorkStruct: Use direct assignment rather than
 cmpxchg()

On Thu, 07 Dec 2006 20:06:39 +0000
David Howells <dhowells@...hat.com> wrote:

> Andrew Morton <akpm@...l.org> wrote:
> 
> > and we can assume (and ensure) that a failing test_and_set_bit() will not
> > write to the affected word at all.
> 
> You may not assume that; and indeed that is not so in the generic
> spinlock-based bitops or ARM pre-v6 or PA-RISC or sparc32 or ...

Ah.  How obnoxious of them.

> Remember: if you have to put a conditional jump in there, it's going to fail
> one way or the other a certain percentage of the time, and that's going to
> cause a pipeline stall, and these ops are used quite a lot.
> 
> OTOH, I don't know that the stall would be that bad since the spin_lock and
> spin_unlock may cause a stall anyway.
> 

Yes, the branch would cost.  But in not uncommon cases that branch will save
the machine from dirtying a cacheline.

And if we add those branches, we bring those architectures' semantics in
line with all the other architectures.  And we get better semantics
overall.

So I don't think we should rule this out.
-
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