Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1237492

Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and atomic{,64}_xchg_* variants

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and atomic{,64}_xchg_* variants
Date Thu, 01 Oct 2015 17:10:02 +0200
Message-ID <qeNEC-8aM-17@gated-at.bofh.it> (permalink)
References <q9nhM-vs-7@gated-at.bofh.it> <q9nhN-vs-19@gated-at.bofh.it> <qeL9N-3Vj-25@gated-at.bofh.it>
X-Original-To Peter Zijlstra <peterz@infradead.org>
X-Ibm-Helo d03dlp01.boulder.ibm.com
X-Ibm-Mailfrom paulmck@linux.vnet.ibm.com
X-Ibm-Rcptto linux-kernel@vger.kernel.org
Reply-To paulmck@linux.vnet.ibm.com
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
X-Tm-As-Mml disable
X-Content-Scanned Fidelis XPS MAILER
X-Cbid 15100115-0013-0000-0000-000018FCF7A3
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 31
Organization linux.* mail to news gateway
X-Original-Cc Boqun Feng <boqun.feng@gmail.com>, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>, Benjamin Herrenschmidt <benh@kernel.crashing.org>, Paul Mackerras <paulus@samba.org>, Michael Ellerman <mpe@ellerman.id.au>, Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will.deacon@arm.com>, Waiman Long <waiman.long@hp.com>
X-Original-Date Thu, 1 Oct 2015 08:09:09 -0700
X-Original-Message-ID <20151001150909.GC4043@linux.vnet.ibm.com>
X-Original-References <1442418575-12297-1-git-send-email-boqun.feng@gmail.com> <1442418575-12297-5-git-send-email-boqun.feng@gmail.com> <20151001122440.GP2881@worktop.programming.kicks-ass.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1237492

Show key headers only | View raw


On Thu, Oct 01, 2015 at 02:24:40PM +0200, Peter Zijlstra wrote:
> On Wed, Sep 16, 2015 at 11:49:32PM +0800, Boqun Feng wrote:
> > Implement xchg_relaxed and define atomic{,64}_xchg_* as xchg_relaxed,
> > based on these _relaxed variants, release/acquire variants can be built.
> > 
> > Note that xchg_relaxed and atomic_{,64}_xchg_relaxed are not compiler
> > barriers.
> 
> Hmm, and I note your previous patch creating the regular _relaxed
> thingies also removes the memory clobber.
> 
> And looking at the ARM _relaxed patch from Will, I see their _relaxed
> ops are also not a compiler barrier.
> 
> I must say I'm somewhat surprised by this level of relaxation, I had
> expected to only loose SMP barriers, not the program order ones.
> 
> Is there a good argument for this?

Yes, when we say "relaxed", we really mean relaxed.  ;-)

Both the CPU and the compiler are allowed to reorder around relaxed
operations.

							Thanx, Paul

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants Peter Zijlstra <peterz@infradead.org> - 2015-10-01 14:30 +0200
  Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-01 17:10 +0200
    Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants Peter Zijlstra <peterz@infradead.org> - 2015-10-01 19:20 +0200
      Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-01 20:10 +0200
        Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants Peter Zijlstra <peterz@infradead.org> - 2015-10-01 20:30 +0200
          Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-10-01 21:50 +0200
        Re: [RFC v2 4/7] powerpc: atomic: Implement xchg_* and  atomic{,64}_xchg_* variants Will Deacon <will.deacon@arm.com> - 2015-10-05 16:50 +0200

csiph-web