Re: Question about PB rule of LKMM
From: Kenneth-Lee-2012
Date: Wed Mar 06 2024 - 19:52:00 EST
On Wed, Mar 06, 2024 at 08:24:42PM +0100, Andrea Parri wrote:
> Date: Wed, 6 Mar 2024 20:24:42 +0100
> From: Andrea Parri <parri.andrea@xxxxxxxxx>
> To: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Cc: Kenneth-Lee-2012@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
> paulmck@xxxxxxxxxx
> Subject: Re: Question about PB rule of LKMM
>
> > Later on, the file includes this paragraph, which answers the question
> > you were asking:
> >
> > ---------------------------------------------------------------------
> > The existence of a pb link from E to F implies that E must execute
> > before F. To see why, suppose that F executed first. Then W would
> > have propagated to E's CPU before E executed. If E was a store, the
> > memory subsystem would then be forced to make E come after W in the
> > coherence order, contradicting the fact that E ->coe W. If E was a
> > load, the memory subsystem would then be forced to satisfy E's read
> > request with the value stored by W or an even later store,
> > contradicting the fact that E ->fre W.
> > ---------------------------------------------------------------------
>
> TBF, that just explains (not F ->xb E), or I guess that was the origin
> of the question.
Yes. I thought a link was just an unconditional pattern for the
programmer to match the actual code so the other categories (of links in
the same acyclic rule) cannot route back. But now I understand the ->xx*
relation in the begining or end of the link can also add xx to the rule.
>
> Andrea
--
-Kenneth Lee