On Mon, 18 Sep 2006, Paul E. McKenney wrote:
Restating (and renumbering) the principles, all assuming no other stores
than those mentioned, assuming no aliasing among variables, and assuming
that each store changes the value of the target variable:
(P0): Each CPU sees its own stores and loads as occurring in program
order.
(P1): If each CPU performs a series of stores to a single shared variable,
then the series of values obtained by the a given CPUs stores and
loads must be consistent with that obtained by each of the other
CPUs. It may or may not be possible to deduce a single global
order from the full set of such series.
Suppose three CPUs respectively write the values 1, 2, and 3 to a single variable. Are you saying that some CPU A might see the values 1,2 (in that order), CPU B might see 2,3 (in that order), and CPU C might see 3,1 (in that order)? Each CPU's view would be consistent with each of the others but there would not be any global order.
Somehow I don't think that's what you intended. In general the actual
situation is much messier, with some writes masking others for some CPUs in such a way that whenever two CPUs both see the same two writes, they see them in the same order. Is that all you meant to say?