[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150713155606.GC19282@twins.programming.kicks-ass.net>
Date: Mon, 13 Jul 2015 17:56:06 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Will Deacon <will.deacon@....com>
Cc: Peter Hurley <peter@...leysoftware.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: [RFC PATCH v2] memory-barriers: remove
smp_mb__after_unlock_lock()
On Mon, Jul 13, 2015 at 03:24:18PM +0100, Will Deacon wrote:
> On Mon, Jul 13, 2015 at 02:09:50PM +0100, Peter Hurley wrote:
> > On 07/13/2015 08:15 AM, Will Deacon wrote:
> > > smp_mb__after_unlock_lock is used to promote an UNLOCK + LOCK sequence
> > > into a full memory barrier.
> > >
> > > However:
> > >
> > > - This ordering guarantee is already provided without the barrier on
> > > all architectures apart from PowerPC
> > >
> > > - The barrier only applies to UNLOCK + LOCK, not general
> > > RELEASE + ACQUIRE operations
> >
> > I'm unclear what you mean here: do you mean
> > A) a memory barrier is not required between RELEASE M + ACQUIRE N when you
> > want to maintain distinct order between those operations on all arches
> > (with the possible exception of PowerPC), or,
> > B) no one is using smp_mb__after_unlock_lock() in that way right now.
>
> My understanding is (B), but Peter and I don't seem to agree yet!
> I'll tighten up the text once we reach a conclusion.
I'm fairly sure (but I've not looked) that nobody does in fact rely on
this.
So I'm in agreement with B, and I'm quibbling on what exactly A means
;-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists