The arm64 architecture has the ability to exclusively load and store
authorSteve Capper <steve.capper@linaro.org>
Wed, 15 Oct 2014 17:40:57 +0000 (18:40 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 23 Oct 2014 13:12:31 +0000 (14:12 +0100)
commit64b57f9219ea2f251c4c3c43c3b36187287d7f9d
treee529445ed88a93403dde2c4173420423c1168b57
parentd845f58bf26cc08b97b74a356c4ec75b79f90b43
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).

On a Juno platform running on only the A57s I get quite a noticeable
performance improvement with hackbench.

Before patch applied:
$ ./hackbench 100 process 1000
Running with 100*40 (== 4000) tasks.
Time: 206.331

After patch applied:
$ ./hackbench 100 process 1000
Running with 100*40 (== 4000) tasks.
Time: 182.396

Signed-off-by: Steve Capper <steve.capper@linaro.org>
arch/arm64/Kconfig
arch/arm64/include/asm/cmpxchg.h