[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160603191314.GA3710@twins.programming.kicks-ass.net>
Date: Fri, 3 Jun 2016 21:13:14 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Will Deacon <will.deacon@....com>
Cc: Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org,
torvalds@...ux-foundation.org, manfred@...orfullife.com,
dave@...olabs.net, paulmck@...ux.vnet.ibm.com, Waiman.Long@....com,
tj@...nel.org, pablo@...filter.org, kaber@...sh.net,
davem@...emloft.net, oleg@...hat.com,
netfilter-devel@...r.kernel.org, sasha.levin@...cle.com,
hofrat@...dl.org, jejb@...isc-linux.org, chris@...kel.net,
rth@...ddle.net, dhowells@...hat.com, schwidefsky@...ibm.com,
mpe@...erman.id.au, ralf@...ux-mips.org, linux@...linux.org.uk,
rkuo@...eaurora.org, vgupta@...opsys.com, james.hogan@...tec.com,
realmz6@...il.com, ysato@...rs.sourceforge.jp, tony.luck@...el.com,
cmetcalf@...lanox.com, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH -v4 5/7] locking, arch: Update spin_unlock_wait()
On Fri, Jun 03, 2016 at 06:35:37PM +0100, Will Deacon wrote:
> On Fri, Jun 03, 2016 at 03:42:49PM +0200, Peter Zijlstra wrote:
> > On Fri, Jun 03, 2016 at 01:47:34PM +0100, Will Deacon wrote:
> > > Even on x86, I think you need a fence here:
> > >
> > > X86 lock
> > > {
> > > }
> > > P0 | P1 ;
> > > MOV EAX,$1 | MOV EAX,$1 ;
> > > LOCK XCHG [x],EAX | LOCK XCHG [y],EAX ;
> > > MOV EBX,[y] | MOV EBX,[x] ;
> > > exists
> > > (0:EAX=0 /\ 0:EBX=0 /\ 1:EAX=0 /\ 1:EBX=0)
> > >
> > > is permitted by herd.
> >
> > I am puzzled.. this should not be. You say adding MFENCE after LOCK XCHG
> > makes it 'work', but we assume LOCK <op> is a full fence all over the
> > place.
> >
> > I'm thinking herd is busted.
>
> FWIW -- I spoke to the Herd authors and they confirmed that this is a
> regresion in herd (fixed in the bleeding edge version).
Good, means I'm not slowly going crazeh -- or at least, this isn't one
of the signs :-)
Powered by blists - more mailing lists