]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/qspinlock: Optimised atomic_try_cmpxchg_lock() that adds the lock hint
authorNicholas Piggin <npiggin@gmail.com>
Fri, 24 Jul 2020 13:14:22 +0000 (23:14 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 26 Jul 2020 14:01:29 +0000 (00:01 +1000)
commitee7520e7726de6c9351fbb64d6cdd3019ece75fc
treeeb923dd64c883cf1cbd977111baf6a146ad55e23
parent31d6910fb95f216ec6bc52aa4683919fc1b06049
powerpc/qspinlock: Optimised atomic_try_cmpxchg_lock() that adds the lock hint

This brings the behaviour of the uncontended fast path back to roughly
equivalent to simple spinlocks -- a single atomic op with lock hint.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200724131423.1362108-6-npiggin@gmail.com
arch/powerpc/include/asm/atomic.h
arch/powerpc/include/asm/qspinlock.h