diff options
author | Will Deacon <will.deacon@arm.com> | 2018-04-26 11:34:23 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-04-27 09:48:50 +0200 |
commit | c131a198c497db436b558ac5e9a140cdcb91b304 (patch) | |
tree | 9f213e959da1d64f45dd7748f94c9d7146d888d4 /include/asm-generic | |
parent | locking/mcs: Use smp_cond_load_acquire() in MCS spin loop (diff) | |
download | linux-dev-c131a198c497db436b558ac5e9a140cdcb91b304.tar.xz linux-dev-c131a198c497db436b558ac5e9a140cdcb91b304.zip |
locking/qspinlock: Use smp_cond_load_relaxed() to wait for next node
When a locker reaches the head of the queue and takes the lock, a
concurrent locker may enqueue and force the lock holder to spin
whilst its node->next field is initialised. Rather than open-code
a READ_ONCE/cpu_relax() loop, this can be implemented using
smp_cond_load_relaxed() instead.
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-10-git-send-email-will.deacon@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/asm-generic')
0 files changed, 0 insertions, 0 deletions