mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Waiman Long <Waiman.Long@hpe.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Scott J Norton <scott.norton@hpe.com>,
	Douglas Hatch <doug.hatch@hpe.com>
Subject: Re: [PATCH tip/locking/core v8 1/5] locking/qspinlock: Use _acquire/_release versions of cmpxchg & xchg
Date: Tue, 20 Oct 2015 11:48:49 +0800	[thread overview]
Message-ID: <20151020034849.GA17714@fixme-laptop.cn.ibm.com> (raw)
In-Reply-To: <20151020034602.GC27292@linux-uzut.site>

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

On Mon, Oct 19, 2015 at 08:46:02PM -0700, Davidlohr Bueso wrote:
> On Tue, 20 Oct 2015, Boqun Feng wrote:
> 
> >>@@ -93,7 +94,7 @@ static __always_inline void queued_spin_unlock(struct qspinlock *lock)
> >> 	/*
> >> 	 * smp_mb__before_atomic() in order to guarantee release semantics
> >> 	 */
> >>-	smp_mb__before_atomic_dec();
> >>+	smp_mb__before_atomic();
> >> 	atomic_sub(_Q_LOCKED_VAL, &lock->val);
> >
> >Just be curious, you don't use atomic_sub_release() here on purpose?
> 
> atomic_sub() does not imply barriers, so there's no relaxed variants; that's
> only for _return() (and such) to the caller.
> 

Ah.. my mistake ;-(

Thank you.

Regards,
Boqun

> Thanks,
> Davidlohr



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

  reply	other threads:[~2015-10-20  3:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15 22:51 [PATCH tip/locking/core v8 0/5] locking/qspinlock: Enhance pvqspinlock performance Waiman Long
2015-10-15 22:51 ` [PATCH tip/locking/core v8 1/5] locking/qspinlock: Use _acquire/_release versions of cmpxchg & xchg Waiman Long
2015-10-20  3:17   ` Boqun Feng
2015-10-20  3:46     ` Davidlohr Bueso
2015-10-20  3:48       ` Boqun Feng [this message]
2015-10-15 22:51 ` [PATCH tip/locking/core v8 2/5] locking/pvqspinlock, x86: Optimize PV unlock code path Waiman Long
2015-10-15 22:51 ` [PATCH tip/locking/core v8 3/5] locking/pvqspinlock: Collect slowpath lock statistics Waiman Long
2015-10-15 22:51 ` [PATCH tip/locking/core v8 4/5] locking/pvqspinlock: Allow 1 lock stealing attempt Waiman Long
2015-10-15 22:51 ` [PATCH tip/locking/core v8 5/5] locking/pvqspinlock: Queue node adaptive spinning Waiman Long

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=20151020034849.GA17714@fixme-laptop.cn.ibm.com \
    --to=boqun.feng@gmail.com \
    --cc=Waiman.Long@hpe.com \
    --cc=dave@stgolabs.net \
    --cc=doug.hatch@hpe.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=scott.norton@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®