]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics
authorWill Deacon <will.deacon@arm.com>
Thu, 6 Aug 2015 16:54:42 +0000 (17:54 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 12 Aug 2015 09:59:06 +0000 (11:59 +0200)
commit77e430e3e45662b696dc49aa53ea0f7ac63f2574
tree1fae9dab1524de8b3ca2516228ff76b809626974
parent2b2a85a4d3534b8884fcfa5bb52837f0e1c672bc
locking/qrwlock: Make use of _{acquire|release|relaxed}() atomics

The qrwlock implementation is slightly heavy in its use of memory
barriers, mainly through the use of _cmpxchg() and _return() atomics, which
imply full barrier semantics.

This patch modifies the qrwlock code to use the more relaxed atomic
routines so that we can reduce the unnecessary barrier overhead on
weakly-ordered architectures.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman.Long@hp.com
Cc: paulmck@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1438880084-18856-7-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/qrwlock.h
kernel/locking/qrwlock.c