[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151020034602.GC27292@linux-uzut.site>
Date: Mon, 19 Oct 2015 20:46:02 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Waiman Long <Waiman.Long@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
linux-kernel@...r.kernel.org,
Scott J Norton <scott.norton@....com>,
Douglas Hatch <doug.hatch@....com>
Subject: Re: [PATCH tip/locking/core v8 1/5] locking/qspinlock: Use
_acquire/_release versions of cmpxchg & xchg
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.
Thanks,
Davidlohr
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists