]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Add support for the optimised lockref implementation
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 15 Jan 2014 07:14:28 +0000 (18:14 +1100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 28 Jan 2014 03:45:43 +0000 (14:45 +1100)
commitcb5d947f4aecb06037c30d22f30dc8397b3a36ee
tree789bd76b9c2b5a0f00bbe1f410927cf23debf96d
parent05dd0a36a8bd67a3def807cbcca30349f46b43ed
powerpc: Add support for the optimised lockref implementation

This commit adds the architecture support required to enable the
optimised implementation of lockrefs.

That's as simple as defining arch_spin_value_unlocked() and selecting
the Kconfig option.

We also define cmpxchg64_relaxed(), because the lockref code does not
need the cmpxchg to have barrier semantics.

Using Linus' test case[1] on one system I see a 4x improvement for the
basic enablement, and a further 1.3x for cmpxchg64_relaxed(), for a
total of 5.3x vs the baseline.

On another system I see more like 2x improvement.

[1]: http://marc.info/?l=linux-fsdevel&m=137782380714721&w=4

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/Kconfig
arch/powerpc/include/asm/cmpxchg.h
arch/powerpc/include/asm/spinlock.h