Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-23 Thread Paul E. McKenney
On Fri, Jan 23, 2015 at 02:08:32PM +, Will Deacon wrote: > On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: > > On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: > > > On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > > > > I started dusting off a

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-23 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: > On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: > > On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > > > I started dusting off a series I've been working to implement a relaxed > > > atomic API in

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-23 Thread Paul E. McKenney
On Fri, Jan 23, 2015 at 02:08:32PM +, Will Deacon wrote: On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: I started dusting off a series I've

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-23 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e.

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-21 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: > On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: > > On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > > > Hi Paul, > > > > > > I started dusting off a series I've been working to implement a relaxed >

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-21 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:35:45PM +, Paul E. McKenney wrote: On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: Hi Paul, I started dusting off a series I've been working to implement a relaxed atomic API

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Paul E. McKenney
On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: > On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > > Hi Paul, > > > > I started dusting off a series I've been working to implement a relaxed > > atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm >

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Will Deacon
Hi Paul, On Tue, Jan 20, 2015 at 03:40:40AM +, Paul E. McKenney wrote: > On Wed, Jan 14, 2015 at 11:31:47AM +, Will Deacon wrote: > > On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: > > > On 01/13, Will Deacon wrote: > > > > > > > > 1. Does smp_mb__before_spinlock

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:34:43AM +, Peter Zijlstra wrote: > On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > > I started dusting off a series I've been working to implement a relaxed > > atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm > > having trouble

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Peter Zijlstra
On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: > Hi Paul, > > I started dusting off a series I've been working to implement a relaxed > atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm > having trouble making sense of the ordering semantics we have in mainline

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Peter Zijlstra
On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: Hi Paul, I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm having trouble making sense of the ordering semantics we have in mainline

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Will Deacon
Hi Paul, On Tue, Jan 20, 2015 at 03:40:40AM +, Paul E. McKenney wrote: On Wed, Jan 14, 2015 at 11:31:47AM +, Will Deacon wrote: On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: On 01/13, Will Deacon wrote: 1. Does smp_mb__before_spinlock actually have to

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Will Deacon
On Tue, Jan 20, 2015 at 09:34:43AM +, Peter Zijlstra wrote: On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm having trouble making

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-20 Thread Paul E. McKenney
On Tue, Jan 20, 2015 at 10:34:43AM +0100, Peter Zijlstra wrote: On Tue, Jan 13, 2015 at 04:33:54PM +, Will Deacon wrote: Hi Paul, I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm having

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-19 Thread Paul E. McKenney
On Wed, Jan 14, 2015 at 11:31:47AM +, Will Deacon wrote: > Hi Oleg, > > On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: > > On 01/13, Will Deacon wrote: > > > > > > 1. Does smp_mb__before_spinlock actually have to order prior loads > > > against later loads and stores?

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-19 Thread Paul E. McKenney
On Wed, Jan 14, 2015 at 11:31:47AM +, Will Deacon wrote: Hi Oleg, On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: On 01/13, Will Deacon wrote: 1. Does smp_mb__before_spinlock actually have to order prior loads against later loads and stores?

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-14 Thread Will Deacon
Hi Oleg, On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: > On 01/13, Will Deacon wrote: > > > > 1. Does smp_mb__before_spinlock actually have to order prior loads > > against later loads and stores? Documentation/memory-barriers.txt > > says it does, but that doesn't

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-14 Thread Will Deacon
Hi Oleg, On Tue, Jan 13, 2015 at 06:45:10PM +, Oleg Nesterov wrote: On 01/13, Will Deacon wrote: 1. Does smp_mb__before_spinlock actually have to order prior loads against later loads and stores? Documentation/memory-barriers.txt says it does, but that doesn't match the

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-13 Thread Oleg Nesterov
On 01/13, Will Deacon wrote: > > 1. Does smp_mb__before_spinlock actually have to order prior loads > against later loads and stores? Documentation/memory-barriers.txt > says it does, but that doesn't match the comment The comment says that smp_mb__before_spinlock() + spin_lock()

Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-13 Thread Will Deacon
Hi Paul, I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm having trouble making sense of the ordering semantics we have in mainline today: 1. Does smp_mb__before_spinlock actually have to order prior

Re: Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-13 Thread Oleg Nesterov
On 01/13, Will Deacon wrote: 1. Does smp_mb__before_spinlock actually have to order prior loads against later loads and stores? Documentation/memory-barriers.txt says it does, but that doesn't match the comment The comment says that smp_mb__before_spinlock() + spin_lock() should

Behaviour of smp_mb__{before,after}_spin* and acquire/release

2015-01-13 Thread Will Deacon
Hi Paul, I started dusting off a series I've been working to implement a relaxed atomic API in Linux (i.e. things like atomic_read(v, ACQUIRE)) but I'm having trouble making sense of the ordering semantics we have in mainline today: 1. Does smp_mb__before_spinlock actually have to order prior