Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-22 Thread Peter Zijlstra
On Thu, Feb 22, 2018 at 06:45:32PM +0800, Boqun Feng wrote: > Maybe it's me who misunderstand Daniel's words. But my understanding is > that riscv people are on a debate about whether their "RCpc" atomic > instructions need to be more strict: release+acquire pair orders two > writes. And I thought

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-22 Thread Boqun Feng
On Thu, Feb 22, 2018 at 11:15:04AM +0100, Peter Zijlstra wrote: > On Thu, Feb 22, 2018 at 02:58:47PM +0800, Boqun Feng wrote: > > > And yes, if we go with a purely RCpc interpretation of acquire and > > > release, then I don't believe the writes in the previous critical > > > section would be order

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-22 Thread Peter Zijlstra
On Thu, Feb 22, 2018 at 11:06:36AM +0100, Peter Zijlstra wrote: > On Wed, Feb 21, 2018 at 09:42:08PM -0800, Daniel Lustig wrote: > > And yes, if we go with a purely RCpc interpretation of acquire and > > release, then I don't believe the writes in the previous critical > > section would be ordered

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-22 Thread Peter Zijlstra
On Thu, Feb 22, 2018 at 02:58:47PM +0800, Boqun Feng wrote: > > And yes, if we go with a purely RCpc interpretation of acquire and > > release, then I don't believe the writes in the previous critical > > section would be ordered with the writes in the subsequent critical > > section. That's reall

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-22 Thread Peter Zijlstra
On Wed, Feb 21, 2018 at 09:42:08PM -0800, Daniel Lustig wrote: > And yes, if we go with a purely RCpc interpretation of acquire and > release, then I don't believe the writes in the previous critical > section would be ordered with the writes in the subsequent critical > section. Excuse my ignoran

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Boqun Feng
On Wed, Feb 21, 2018 at 09:42:08PM -0800, Daniel Lustig wrote: > On 2/21/2018 9:27 PM, Boqun Feng wrote: > > On Wed, Feb 21, 2018 at 08:13:57PM -0800, Paul E. McKenney wrote: > >> On Thu, Feb 22, 2018 at 11:23:49AM +0800, Boqun Feng wrote: > >>> On Tue, Feb 20, 2018 at 03:25:10PM -0800, Paul E. McK

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Daniel Lustig
On 2/21/2018 9:27 PM, Boqun Feng wrote: > On Wed, Feb 21, 2018 at 08:13:57PM -0800, Paul E. McKenney wrote: >> On Thu, Feb 22, 2018 at 11:23:49AM +0800, Boqun Feng wrote: >>> On Tue, Feb 20, 2018 at 03:25:10PM -0800, Paul E. McKenney wrote: From: Alan Stern This commit adds a litmus

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Boqun Feng
On Wed, Feb 21, 2018 at 08:13:57PM -0800, Paul E. McKenney wrote: > On Thu, Feb 22, 2018 at 11:23:49AM +0800, Boqun Feng wrote: > > On Tue, Feb 20, 2018 at 03:25:10PM -0800, Paul E. McKenney wrote: > > > From: Alan Stern > > > > > > This commit adds a litmus test in which P0() and P1() form a loc

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Paul E. McKenney
On Thu, Feb 22, 2018 at 11:23:49AM +0800, Boqun Feng wrote: > On Tue, Feb 20, 2018 at 03:25:10PM -0800, Paul E. McKenney wrote: > > From: Alan Stern > > > > This commit adds a litmus test in which P0() and P1() form a lock-based S > > litmus test, with the addition of P2(), which observes P0()'s

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Boqun Feng
On Tue, Feb 20, 2018 at 03:25:10PM -0800, Paul E. McKenney wrote: > From: Alan Stern > > This commit adds a litmus test in which P0() and P1() form a lock-based S > litmus test, with the addition of P2(), which observes P0()'s and P1()'s > accesses with a full memory barrier but without the lock.

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Paul E. McKenney
On Wed, Feb 21, 2018 at 02:27:04PM -0500, Alan Stern wrote: > On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > > > +ISA2+pooncelock+pooncelock+pombonce.litmus > > > > + Tests whether the ordering provided by a lock-protected S litmus > > > > > > Call it an ISA2 litmus test, not an S litmu

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Paul E. McKenney
On Wed, Feb 21, 2018 at 01:38:35PM -0500, Alan Stern wrote: > On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > On Wed, Feb 21, 2018 at 11:50:31AM -0500, Alan Stern wrote: > > > On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > > > > > On Wed, Feb 21, 2018 at 10:09:00AM -0500, Alan Stern wrote:

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Alan Stern
On Wed, 21 Feb 2018, Paul E. McKenney wrote: > On Wed, Feb 21, 2018 at 11:50:31AM -0500, Alan Stern wrote: > > On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > > > On Wed, Feb 21, 2018 at 10:09:00AM -0500, Alan Stern wrote: > > > > On Tue, 20 Feb 2018, Paul E. McKenney wrote: > > > > > > > > >

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Alan Stern
On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > +ISA2+pooncelock+pooncelock+pombonce.litmus > > > + Tests whether the ordering provided by a lock-protected S litmus > > > > Call it an ISA2 litmus test, not an S litmus test! > > Given the structure of the test, the relationship to S is importa

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Paul E. McKenney
On Wed, Feb 21, 2018 at 11:50:31AM -0500, Alan Stern wrote: > On Wed, 21 Feb 2018, Paul E. McKenney wrote: > > > On Wed, Feb 21, 2018 at 10:09:00AM -0500, Alan Stern wrote: > > > On Tue, 20 Feb 2018, Paul E. McKenney wrote: > > > > > > > From: Alan Stern > > > > > > > > This commit adds a litmu

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Alan Stern
On Wed, 21 Feb 2018, Paul E. McKenney wrote: > On Wed, Feb 21, 2018 at 10:09:00AM -0500, Alan Stern wrote: > > On Tue, 20 Feb 2018, Paul E. McKenney wrote: > > > > > From: Alan Stern > > > > > > This commit adds a litmus test in which P0() and P1() form a lock-based S > > > litmus test, with th

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Paul E. McKenney
On Wed, Feb 21, 2018 at 10:09:00AM -0500, Alan Stern wrote: > On Tue, 20 Feb 2018, Paul E. McKenney wrote: > > > From: Alan Stern > > > > This commit adds a litmus test in which P0() and P1() form a lock-based S > > litmus test, with the addition of P2(), which observes P0()'s and P1()'s > > Wh

Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S lock-based external-view litmus test

2018-02-21 Thread Alan Stern
On Tue, 20 Feb 2018, Paul E. McKenney wrote: > From: Alan Stern > > This commit adds a litmus test in which P0() and P1() form a lock-based S > litmus test, with the addition of P2(), which observes P0()'s and P1()'s Why do you call this an "S" litmus test? Isn't ISA2 a better description? >