mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
	"Waiman.Long@hp.com" <Waiman.Long@hp.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"paulmck@linux.vnet.ibm.com" <paulmck@linux.vnet.ibm.com>,
	"mingo@kernel.org" <mingo@kernel.org>
Subject: Re: [PATCH v5 0/8] Add generic support for relaxed atomics
Date: Wed, 26 Aug 2015 19:35:07 +0800	[thread overview]
Message-ID: <20150826113507.GA7922@fixme-laptop.cn.ibm.com> (raw)
In-Reply-To: <20150826104100.GB30466@arm.com>

[-- Attachment #1: Type: text/plain, Size: 2265 bytes --]

Hi Will,

On Wed, Aug 26, 2015 at 11:41:00AM +0100, Will Deacon wrote:
> Hi Boqun,
> 
> On Wed, Aug 26, 2015 at 05:28:34AM +0100, Boqun Feng wrote:
> > On Thu, Aug 06, 2015 at 05:54:36PM +0100, Will Deacon wrote:
> > > Will Deacon (8):
> > >   atomics: add acquire/release/relaxed variants of some atomic
> > >     operations
> > >   asm-generic: rework atomic-long.h to avoid bulk code duplication
> > >   asm-generic: add relaxed/acquire/release variants for atomic_long_t
> > >   lockref: remove homebrew cmpxchg64_relaxed macro definition
> > >   locking/qrwlock: implement queue_write_unlock using smp_store_release
> > >   locking/qrwlock: make use of acquire/release/relaxed atomics
> > >   include/llist: use linux/atomic.h instead of asm/cmpxchg.h
> > 
> > Should we step further to privatize asm/cmpxchg.h entirely? Keep it only
> > included in arch/*?
> > 
> > Because after your next patch, in some configurations, asm/cmpxchg.h of
> > ARM only provides the definition of {cmpxchg,xchg}_relaxed, others are
> > built in linux/atomic.h. Further more, other architecture may implement
> > asm/cmpxchg.h similarly in the future. So, IIUC, we actually don't
> > guarantee all cmpxchg(), xchg() and their variants are defined in
> > asm/cmpxchg.h.
> > 
> > Though current users of asm/cmpxchg.h outside arch/* are fine,
> > because they all happen to have got linux/atomic.h included. But we'd
> > better change the current users and call out that asm/cmpxchg.h is
> > privatized in the document.
> > 
> > >   ARM: atomics: define our SMP atomics in terms of _relaxed operations
> > 
> > 
> > Consider this patch maybe? I did a simple build test on X86.
> 
> I'm not sure that the addition to Documentation/atomic_ops.txt is really

Well.. I think at least we'd better say "to use {cmp,}xchg, include
linux/atomic.h" somewhere, because these two function families don't
have atomic_ prefix and don't take atomic{,64}_t as a parameter.

> worth it, but either way:
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>

Thank you!

> 
> It's probably best to send this as a standalone patch, since the relaxed
> parts are already queued in -tip.

Good point. Will send a standalone patch.

Regards,
Boqun

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

      reply	other threads:[~2015-08-26 11:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-06 16:54 Will Deacon
2015-08-06 16:54 ` [PATCH v5 1/8] atomics: add acquire/release/relaxed variants of some atomic operations Will Deacon
2015-08-12 12:34   ` [tip:locking/core] locking/atomics: Add _{acquire|release|relaxed}() " tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 2/8] asm-generic: rework atomic-long.h to avoid bulk code duplication Will Deacon
2015-08-12 12:34   ` [tip:locking/core] locking, asm-generic: Rework " tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 3/8] asm-generic: add relaxed/acquire/release variants for atomic_long_t Will Deacon
2015-08-12 12:35   ` [tip:locking/core] locking, asm-generic: Add _{relaxed|acquire|release}() variants for 'atomic_long_t' tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 4/8] lockref: remove homebrew cmpxchg64_relaxed macro definition Will Deacon
2015-08-12 12:35   ` [tip:locking/core] locking/lockref: Remove homebrew cmpxchg64_relaxed() " tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 5/8] locking/qrwlock: implement queue_write_unlock using smp_store_release Will Deacon
2015-08-12 12:35   ` [tip:locking/core] locking/qrwlock: Implement queue_write_unlock( ) using smp_store_release() tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 6/8] locking/qrwlock: make use of acquire/release/relaxed atomics Will Deacon
2015-08-12 12:36   ` [tip:locking/core] locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 7/8] include/llist: use linux/atomic.h instead of asm/cmpxchg.h Will Deacon
2015-08-12 12:36   ` [tip:locking/core] locking, include/llist: Use linux/ atomic.h " tip-bot for Will Deacon
2015-08-06 16:54 ` [PATCH v5 8/8] ARM: atomics: define our SMP atomics in terms of _relaxed operations Will Deacon
2015-08-12 12:36   ` [tip:locking/core] locking, ARM, atomics: Define our SMP atomics in terms of _relaxed() operations tip-bot for Will Deacon
2015-08-07 15:13 ` [PATCH v5 0/8] Add generic support for relaxed atomics Peter Zijlstra
2015-08-07 16:29   ` Will Deacon
2015-08-26  4:28 ` Boqun Feng
2015-08-26 10:41   ` Will Deacon
2015-08-26 11:35     ` Boqun Feng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150826113507.GA7922@fixme-laptop.cn.ibm.com \
    --to=boqun.feng@gmail.com \
    --cc=Waiman.Long@hp.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®