Re: Memory-ordering recipes

2017-10-18 Thread Paul E. McKenney
On Wed, Oct 18, 2017 at 03:07:48AM +0200, Andrea Parri wrote: > On Tue, Oct 17, 2017 at 02:01:37PM -0700, Paul E. McKenney wrote: > > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > > Hello! > > > > > > The topic of memory-ordering r

Re: Memory-ordering recipes

2017-10-17 Thread Andrea Parri
On Tue, Oct 17, 2017 at 02:01:37PM -0700, Paul E. McKenney wrote: > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > Hello! > > > > The topic of memory-ordering recipes came up at the Linux Plumbers > > Conference microconference on Friday,

Re: Memory-ordering recipes

2017-10-17 Thread Paul E. McKenney
On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > Hello! > > The topic of memory-ordering recipes came up at the Linux Plumbers > Conference microconference on Friday, so I thought that I should summarize > what is currently "out there": And here is an

Re: Memory-ordering recipes

2017-09-22 Thread Paul E. McKenney
On Fri, Sep 22, 2017 at 11:29:18AM +0200, Peter Zijlstra wrote: > On Thu, Sep 21, 2017 at 09:40:46AM -0700, Paul E. McKenney wrote: > > > Also, none of these cover 'simple' stuff like a ring-buffer. > > > > Control dependencies are now 'simple'? ;-) > > They're not particularly harder than any o

Re: Memory-ordering recipes

2017-09-22 Thread Peter Zijlstra
On Thu, Sep 21, 2017 at 09:40:46AM -0700, Paul E. McKenney wrote: > > Also, none of these cover 'simple' stuff like a ring-buffer. > > Control dependencies are now 'simple'? ;-) They're not particularly harder than any other barrier I find. But again, this comes back to the purpose of this reci

Re: Memory-ordering recipes

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 06:15:47PM +0200, Peter Zijlstra wrote: > On Thu, Sep 21, 2017 at 08:26:42AM -0700, Paul E. McKenney wrote: > > ISA2 is the first one on page 2, and has this pattern of reads and > > writes: > > > > CPU 0 CPU 1 CPU 2 > > > > WRIT

Re: Memory-ordering recipes

2017-09-21 Thread Peter Zijlstra
On Thu, Sep 21, 2017 at 08:26:42AM -0700, Paul E. McKenney wrote: > ISA2 is the first one on page 2, and has this pattern of reads and > writes: > > CPU 0 CPU 1 CPU 2 > > WRITE_ONCE(x, 1); r1 = READ_ONCE(y); r2 = READ_ONCE(z); > WRI

Re: Memory-ordering recipes

2017-09-21 Thread Paul E. McKenney
On Thu, Sep 21, 2017 at 02:45:31PM +0200, Peter Zijlstra wrote: > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > > So what litmus tests are needed? Here is my initial set: > > > > 1. Release-acquire chains, AKA ISA2, Z6.2, LB, and 3.LB I grouped the expansions of all of

Re: Memory-ordering recipes

2017-09-21 Thread Peter Zijlstra
On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > So what litmus tests are needed? Here is my initial set: > > 1.Release-acquire chains, AKA ISA2, Z6.2, LB, and 3.LB > > Lots of variety here, can in some cases substitute: > > a. READ_ONCE() for smp_

Re: Memory-ordering recipes

2017-09-18 Thread Boqun Feng
On Mon, Sep 18, 2017 at 07:25:48AM -0700, Paul E. McKenney wrote: > On Mon, Sep 18, 2017 at 03:52:42PM +0800, Boqun Feng wrote: > > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > > Hello! > > > > > > > Hi Paul, > > > > &g

Re: Memory-ordering recipes

2017-09-18 Thread Paul E. McKenney
On Mon, Sep 18, 2017 at 03:52:42PM +0800, Boqun Feng wrote: > On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > > Hello! > > > > Hi Paul, > > > The topic of memory-ordering recipes came up at the Linux Plumbers > > Conference microconfe

Re: Memory-ordering recipes

2017-09-18 Thread Boqun Feng
On Sun, Sep 17, 2017 at 04:05:09PM -0700, Paul E. McKenney wrote: > Hello! > Hi Paul, > The topic of memory-ordering recipes came up at the Linux Plumbers > Conference microconference on Friday, so I thought that I should summarize > what is currently "out there": >

Memory-ordering recipes

2017-09-17 Thread Paul E. McKenney
Hello! The topic of memory-ordering recipes came up at the Linux Plumbers Conference microconference on Friday, so I thought that I should summarize what is currently "out there": 1. memory-barriers.txt: A bit rambling and diffuse for a recipes document. 2.