Re: [PATCH 4/4] locking: Introduce smp_cond_acquire()

Linus Torvalds
2015-11-03T01:25:34Z

On Mon, Nov 2, 2015 at 5:14 PM, Paul E. McKenney
<paulmck@linux.vnet.ibm.com> wrote:
>
> You would ask that question when I am many thousands of miles from my
> copy of the Alpha reference manual! ;-)

I don't think I've touched a paper manual in years. Too m uch effort
to index and search. Look here

http://download.majix.org/dec/alpha_arch_ref.pdf

> There is explicit wording in that manual that says that no multi-variable
> ordering is implied without explicit memory-barrier instructions.

Right. But the whole "read -> conditional -> write" ends up being a
dependency chain to *every* single write that happens after the
conditional.

So there may be no "multi-variable ordering" implied in any individual
access, but despite that a simple "read + conditional" orders every
single store that comes after it. Even if it orders them
"individually".

Linus