Re: [RFC] LKMM: Add volatile_if()

Started by Paul E. McKenney on Aug 2, 2021 · 2 messages from 2 authors · Last reply Aug 4, 2021

open the first message on its own page

Message details and related content
On Fri, Jul 30, 2021 at 06:20:22PM +0100, Jade Alglave wrote:

[ . . . ]
Sincere apologies in taking so long to reply. I attach a technical
report which describes the status of dependencies in the Arm memory
model. 

I have also released the corresponding cat files and a collection of
interesting litmus tests over here:
https://github.com/herd/herdtools7/commit/f80bd7c2e49d7d3adad22afc62ff4768d65bf830

I hope this material can help inform this conversation and I would love
to hear your thoughts.
It is very good to see this!  A few random questions and comments below
based on a couple of passes through this document.

							Thanx, Paul

------------------------------------------------------------------------

o	Figure 2: The iico_data arc are essentially invisible after
	printing, as in the text on the following page is darker
	than these arcs.  I had similar difficulties with many
	of the other diagrams.

o	Figure 2: What does the "q" signify in the upper line of the
	uppermost event-c box ("R0:X1q=x")?  I get that we are reading
	register X1 and getting back the address of variable "x".  I am
	assuming that the "R0" means that process 0 is doing a read,
	but I cannot be sure.

	I am assuming that the "proc: P0 poi:0" means that this is
	the first instruction of process P0.  If this is incorrect,
	please let me know.

o	Figure 6 initializes X0, X1, X2, and X3, while Figure 4
	initializes only X0 and X3.  Is this difference meaningful?
	(My guess is that you have default-zero initialization so
	that it does not matter, but I figured that I should ask.)

o	Figure 6: The iico_ctrl arcs are easier to see on printed copy
	than the iico_data arcs, but it would be nice if they were a
	bit darker.  The rf-reg arcs are plainly visible.

o	Figure 6: Why is there no po arc to the CSEL instruction?

o	Section 1.3, "Swap instructions" paragraph.  Please supply
	a litmus-test figure to go along with Figure 12.

o	Figures 10 and 11: Having these on the same page was extremely
	helpful, thank you!

63 more lines

Message details and related content
On Mon, Aug 02, 2021 at 04:31:56PM -0700, Paul E. McKenney wrote:
o	Section 2 I leave in Alan's capable hands.
Here goes, although I'm not sure how important this is, given that 
section 2 is presented as merely a "straw man" argument for something 
that ARM decided to abandon.

While reading this section (and the paper in general), it was annoying 
that the terms "down-one-leg" and "down-two-legs" are never explained or 
motivated.  Even after reading section 2, I'm still not sure what they 
are really intended to mean.  My impression is that "down-one-leg" is an 
attempt to express the idea that control dependencies apply to accesses 
occurring along one leg of a conditional but not to accesses occurring 
after the two legs have rejoined.  Is that right?

P.17: "The drawback of this approach is that it would require order for 
the “independent” case" -- this doesn't seem like a drawback to me.  
Particularly since no existing architecture attempts to avoid ordering 
the independent case.

Def. of "points of divergence": This is not very precise.  What exactly 
is a "branching decision"?  Do the two paths of a CAS or CSEL 
instruction count?  What if the decision doesn't involve whether or not 
to take the branch but rather where to branch to (as in a computed 
branch or even just a call through a function pointer)?

Def. of "address dependency": How could there be a Dependency through 
registers from D4 to R2?  It's not at all easy to untangle the 
definitions to see what this might mean.  What would be an example?  At 
any rate, the case where RW2 is a Memory read doesn't seem right.  It 
says that:

	R0 = Load
	R1 = Load([R0])

is an address dependency but

	R0 = Load
	// Branching decision that depends on the value of R0 and
	// carries a Dependency through registers to a new value for
	// R0 (whatever that may mean) which is always equal to the
	// existing value 

32 more lines

Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help