diff options
author | Steve Capper <steve.capper@linaro.org> | 2014-10-24 08:22:20 -0400 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2014-11-06 12:25:28 -0500 |
commit | 5284e1b4bc8ae6fcc1c92c63cf6c876a53292f82 (patch) | |
tree | 3aeddebd2c9ebbb59bf7e6eec64796c97c5c5c2c /arch/arm64/Kconfig | |
parent | 70ddb63a88bfd45eb6abe36e2bf4f8f351a447d7 (diff) |
arm64: xchg: Implement cmpxchg_double
The arm64 architecture has the ability to exclusively load and store
a pair of registers from an address (ldxp/stxp). Also the SLUB can take
advantage of a cmpxchg_double implementation to avoid taking some
locks.
This patch provides an implementation of cmpxchg_double for 64-bit
pairs, and activates the logic required for the SLUB to use these
functions (HAVE_ALIGNED_STRUCT_PAGE and HAVE_CMPXCHG_DOUBLE).
Also definitions of this_cpu_cmpxchg_8 and this_cpu_cmpxchg_double_8
are wired up to cmpxchg_local and cmpxchg_double_local (rather than the
stock implementations that perform non-atomic operations with
interrupts disabled) as they are used by the SLUB.
On a Juno platform running on only the A57s I get quite a noticeable
performance improvement with 5 runs of hackbench on v3.17:
Baseline | With Patch
-----------------+-----------
Mean 119.2312 | 106.1782
StdDev 0.4919 | 0.4494
(times taken to complete `./hackbench 100 process 1000', in seconds)
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/Kconfig')
-rw-r--r-- | arch/arm64/Kconfig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 2c3c2ca6f8bc..1e0e4671dd25 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig | |||
@@ -34,6 +34,7 @@ config ARM64 | |||
34 | select GENERIC_TIME_VSYSCALL | 34 | select GENERIC_TIME_VSYSCALL |
35 | select HANDLE_DOMAIN_IRQ | 35 | select HANDLE_DOMAIN_IRQ |
36 | select HARDIRQS_SW_RESEND | 36 | select HARDIRQS_SW_RESEND |
37 | select HAVE_ALIGNED_STRUCT_PAGE if SLUB | ||
37 | select HAVE_ARCH_AUDITSYSCALL | 38 | select HAVE_ARCH_AUDITSYSCALL |
38 | select HAVE_ARCH_JUMP_LABEL | 39 | select HAVE_ARCH_JUMP_LABEL |
39 | select HAVE_ARCH_KGDB | 40 | select HAVE_ARCH_KGDB |
@@ -41,6 +42,7 @@ config ARM64 | |||
41 | select HAVE_BPF_JIT | 42 | select HAVE_BPF_JIT |
42 | select HAVE_C_RECORDMCOUNT | 43 | select HAVE_C_RECORDMCOUNT |
43 | select HAVE_CC_STACKPROTECTOR | 44 | select HAVE_CC_STACKPROTECTOR |
45 | select HAVE_CMPXCHG_DOUBLE | ||
44 | select HAVE_DEBUG_BUGVERBOSE | 46 | select HAVE_DEBUG_BUGVERBOSE |
45 | select HAVE_DEBUG_KMEMLEAK | 47 | select HAVE_DEBUG_KMEMLEAK |
46 | select HAVE_DMA_API_DEBUG | 48 | select HAVE_DMA_API_DEBUG |