On Mon, Jul 13, 2015 at 03:09:15PM +0100, Will Deacon wrote:
> On Mon, Jul 13, 2015 at 02:11:43PM +0100, Peter Zijlstra wrote:
> > On Mon, Jul 13, 2015 at 01:15:04PM +0100, Will Deacon wrote:
> > > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence
> > > into a full memory barrier.
> > > 
> > > However:
> > 
> > >   - The barrier only applies to UNLOCK + LOCK, not general
> > >     RELEASE + ACQUIRE operations
> > 
> > No it does too; note that on ppc both acquire and release use lwsync and
> > two lwsyncs do not make a sync.
> 
> Really? IIUC, that means smp_mb__after_unlock_lock needs to be a full
> barrier on all architectures implementing smp_store_release as smp_mb() +
> STORE, otherwise the following isn't ordered:
> 
>   RELEASE X
>   smp_mb__after_unlock_lock()
>   ACQUIRE Y
> 
> On 32-bit ARM (at least), the ACQUIRE can be observed before the RELEASE.

I knew we'd had this conversation before ;)

  
http://lkml.kernel.org/r/20150120093443.ga11...@twins.programming.kicks-ass.net

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to