diff options
author | Will Deacon <will.deacon@arm.com> | 2018-04-26 13:34:26 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-04-27 10:48:52 +0300 |
commit | ae75d9089ff7095d1d1a12c3cd86b21d3eaf3b15 (patch) | |
tree | a20982c45c6d23b63e8f7debae5946b4f8604c09 /kernel/locking/qspinlock_paravirt.h | |
parent | 9d4646d14d51d62b967a12452c30ea7edf8dd8fa (diff) | |
download | linux-ae75d9089ff7095d1d1a12c3cd86b21d3eaf3b15.tar.xz |
locking/qspinlock: Use try_cmpxchg() instead of cmpxchg() when locking
When reaching the head of an uncontended queue on the qspinlock slow-path,
using a try_cmpxchg() instead of a cmpxchg() operation to transition the
lock work to _Q_LOCKED_VAL generates slightly better code for x86 and
pretty much identical code for arm64.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Waiman Long <longman@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boqun.feng@gmail.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: paulmck@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1524738868-31318-13-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/qspinlock_paravirt.h')
0 files changed, 0 insertions, 0 deletions