Re: [PATCH locking/Documentation 1/2] Add note of release-acquire store vulnerability

From: Peter Zijlstra
Date: Fri Sep 30 2016 - 04:54:05 EST


On Thu, Sep 29, 2016 at 03:36:38PM -0400, Alan Stern wrote:
> > > If you execute P0 and P1 concurrently and one store of each 'wins' the
> > > LWSYNC of either is null and void, and therefore P2 is unordered and can
> > > observe r2==0.
>
> Not so. lwsync instructions cannot be "voided".

I distinctly remember there being a case (smp_wmb()) where the lwsync
would disappear if the store was lost.