locking/qspinlock: Use _acquire/_release() versions of cmpxchg() & xchg()
authorWaiman Long <Waiman.Long@hpe.com>
Tue, 10 Nov 2015 00:09:21 +0000 (19:09 -0500)
committerIngo Molnar <mingo@kernel.org>
Mon, 23 Nov 2015 09:01:58 +0000 (10:01 +0100)
commit64d816cba06c67eeee455b8c78ebcda349d49c24
tree4f84909ad1dbf50bfc038dde2e72285f8e98521e
parent978e5a3692c3b674b4c7c412e96835fd996c2ff4
locking/qspinlock: Use _acquire/_release() versions of cmpxchg() & xchg()

This patch replaces the cmpxchg() and xchg() calls in the native
qspinlock code with the more relaxed _acquire or _release versions of
those calls to enable other architectures to adopt queued spinlocks
with less memory barrier performance overhead.

Signed-off-by: Waiman Long <Waiman.Long@hpe.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Douglas Hatch <doug.hatch@hpe.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1447114167-47185-2-git-send-email-Waiman.Long@hpe.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/qspinlock.h
kernel/locking/qspinlock.c