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

From: Linus Torvalds
Date: Mon Nov 02 2015 - 20:25:37 EST


On Mon, Nov 2, 2015 at 5:14 PM, Paul E. McKenney
<paulmck@xxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/