On Wed, Jan 18, 2023 at 10:38:11PM +0100, Jonas Oberhauser wrote:Indeed, in fact all of A-cumul(strong-fence) is already covered through pb.
What about the ordering given through
On 1/18/2023 8:52 PM, Alan Stern wrote:
On Tue, Jan 17, 2023 at 08:31:59PM +0100, Jonas Oberhauser wrote:You can leave it here, but it is already covered by two other parts: the
- ([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M]) |Shouldn't the po case of (co | po) remain intact here?
- ([M] ; po ; [UL] ; (co | po) ; [LKW] ;
- fencerel(After-unlock-lock) ; [M])
+ ([M] ; po? ; [LKW] ; fencerel(After-spinlock) ; [M])
ordering given through ppo/hb is covered by the po-unlock-lock-po & int in
ppo, and the ordering given through pb is covered by its inclusion in
strong-order.
A-cumul(strong-fence)/cumul-fence/prop/hb? I suppose that might be
superseded by pb as well,
but it seems odd not to have it in hb.
In general, the idea in the memory model is that hb ordering relies on
the non-strong properties of fences, whereas pb relies on the properties
of strong fences, and rb relies on the properties of the RCU fences.
I'm not sure that argument is right. The smp_mb__after_unlock_lockIndeed it is not, but the subsequent lock-unlock sequences are in hb*. For@@ -91,8 +89,12 @@ acyclic hb as happens-beforeThis is not the same as the definition removed above. In particular,
(* Write and fence propagation ordering *)
(****************************************)
-(* Propagation: Each non-rf link needs a strong fence. *)
-let pb = prop ; strong-fence ; hb* ; [Marked]
+(* Strong ordering operations *)
+let strong-order = strong-fence | ([M] ; po-unlock-lock-po ;
+ [After-unlock-lock] ; po ; [M])
po-unlock-lock-po only allows one step along the locking chain -- it has
rf where the definition above has co.
this reason it can be simplified to just consider the directly following
unlock().
needs to go after the _last_ lock in the sequence, not after the first.
So you don't have to worry about subsequent lock-unlock sequences; you
have to worry about preceding lock-unlock sequences.