lkml.org 
[lkml]   [2022]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] tools/memory-model: Adjust ctrl dependency definition
On Fri, Jul 15, 2022 at 09:27:26AM -0400, Alan Stern wrote:
> On Fri, Jul 15, 2022 at 02:27:28PM +0200, Paul Heidekrüger wrote:
> > I have just been thinking about how to word this patch; am I correct in
> > assuming that the LKMM does not deal with loop conditions? Or in other
> > words, there is no way for a loop condition to impose a ctrl dependency on
> > any WRITE_ONCE's in the loop body? It are only if and switch statements the
> > LKMM is concerned with in the case of ctrl dependencies?
>
> In theory, the LKMM does say that a loop condition imposes a control
> dependency on any memory accesses within the loop body. However, the
> herd7 tool has only very limited support for looping constructs, so in
> practice it's not possible to create suitable litmus tests with loops.

And Alan isn't joking. The closest simulation that I know of is to
combine limited loop unrolling with the "filter" clause. The point of
the filter clause is to eliminate from consideration executions that
need the more iterations of the loop to be unrolled.

And that means that as far as LKMM is concerned, loop-based control
dependencies are similar to those for nested "if" statements.

Thanx, Paul

\
 
 \ /
  Last update: 2022-07-15 17:22    [W:0.058 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site