Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1421587
| From | Boqun Feng <boqun.feng@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] locking/qspinlock: Use atomic_sub_return_release in queued_spin_unlock |
| Date | 2016-06-14 07:50 +0200 |
| Message-ID | <rJPoB-sy-9@gated-at.bofh.it> (permalink) |
| References | <rFSO5-PO-3@gated-at.bofh.it> <rJGbE-2nm-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Mon, Jun 13, 2016 at 12:45:23PM -0700, Davidlohr Bueso wrote:
> On Fri, 03 Jun 2016, Pan Xinhui wrote:
>
> > The existing version uses a heavy barrier while only release semantics
> > is required. So use atomic_sub_return_release instead.
> >
> > Suggested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
>
> I just noticed this change in -tip and, while I know that saving a barrier
> in core spinlock paths is perhaps a worthy exception, I cannot help but
> wonder if this is the begging of the end for smp__{before,after}_atomic().
This is surely a good direction I think, that is using _acquire and
_release primitives to replace those barriers. However, I think we
should do this carefully, because the _acquire and _release primitives
are RCpc because they are on PPC, IOW, a ACQUIRE and RELEASE pair is not
a full barrier nor provides global transivity. I'm worried about there
are some users depending on the full-barrier semantics, which means we
must audit each use carefully before we make the change.
Besides, if we want to do the conversion, we'd better have _acquire and
_release variants for non-value-returning atomic operations.
I remember you were working on those variants. How is that going?
Regards,
Boqun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] locking/qspinlock: Use atomic_sub_return_release in queued_spin_unlock Davidlohr Bueso <dave@stgolabs.net> - 2016-06-13 22:00 +0200
Re: [PATCH] locking/qspinlock: Use atomic_sub_return_release in queued_spin_unlock Boqun Feng <boqun.feng@gmail.com> - 2016-06-14 07:50 +0200
Re: [PATCH] locking/qspinlock: Use atomic_sub_return_release in queued_spin_unlock Peter Zijlstra <peterz@infradead.org> - 2016-06-14 14:10 +0200
csiph-web