[RFC][PATCH -v2 0/4] locking/mutex: Rewrite basic mutex

From: Peter Zijlstra
Date: Thu Aug 25 2016 - 14:47:16 EST


... might still eat your pets and set your house on fire ...

Passes reaim high_systime on 4 socket haswell..

4.8.0-rc3-00185-g9f55477 +2 +all
Forks Jobs/min Jobs/min Jobs/min
10 1040.00 1039.83 1039.83
20 1600.00 1599.79 1600.00
30 2127.27 2127.27 2127.03
40 2599.73 2599.46 2599.19
50 3088.50 3088.50 3088.50
60 3531.08 3531.08 3531.41
70 3969.83 3969.47 3969.83
80 4377.80 4377.80 4377.80
90 4797.95 4798.77 4798.77
100 5198.27 5198.27 5198.70
200 9038.89 9038.89 9040.20
300 12642.67 12643.52 12643.52
400 15970.31 15993.85 15994.87
500 19365.65 19339.24 19368.06
600 22537.92 22542.00 22513.53
700 25536.39 25653.37 25552.83
800 28673.18 28664.94 28671.53
900 31596.71 31685.85 31700.16
1000 34651.27 34643.57 34649.34
1100 37679.09 37693.57 37693.57
1200 40675.76 40675.76 40175.98
1300 43573.08 43575.42 42993.43
1400 46398.98 46406.37 46440.91
1500 48977.03 49203.60 48432.16
1600 51940.48 51970.23 51037.73
1700 54929.58 54646.61 54923.89
1800 57432.12 57538.04 57529.19
1900 60437.38 60434.30 60446.62
2000 62950.82 62973.05 61760.78

Still need to add spinning to the top waiter etc... lockdep is still
broken and there might still be races.

---
arch/alpha/include/asm/mutex.h | 9 -
arch/arc/include/asm/mutex.h | 18 --
arch/arm/include/asm/mutex.h | 21 --
arch/arm64/include/asm/Kbuild | 1 -
arch/avr32/include/asm/mutex.h | 9 -
arch/blackfin/include/asm/Kbuild | 1 -
arch/c6x/include/asm/mutex.h | 6 -
arch/cris/include/asm/mutex.h | 9 -
arch/frv/include/asm/mutex.h | 9 -
arch/h8300/include/asm/mutex.h | 9 -
arch/hexagon/include/asm/mutex.h | 8 -
arch/ia64/include/asm/mutex.h | 90 --------
arch/m32r/include/asm/mutex.h | 9 -
arch/m68k/include/asm/Kbuild | 1 -
arch/metag/include/asm/Kbuild | 1 -
arch/microblaze/include/asm/mutex.h | 1 -
arch/mips/include/asm/Kbuild | 1 -
arch/mn10300/include/asm/mutex.h | 16 --
arch/nios2/include/asm/mutex.h | 1 -
arch/openrisc/include/asm/mutex.h | 27 ---
arch/parisc/include/asm/Kbuild | 1 -
arch/powerpc/include/asm/mutex.h | 132 ------------
arch/s390/include/asm/mutex.h | 9 -
arch/score/include/asm/mutex.h | 6 -
arch/sh/include/asm/mutex-llsc.h | 109 ----------
arch/sh/include/asm/mutex.h | 12 --
arch/sparc/include/asm/Kbuild | 1 -
arch/tile/include/asm/Kbuild | 1 -
arch/um/include/asm/Kbuild | 1 -
arch/unicore32/include/asm/mutex.h | 20 --
arch/x86/include/asm/mutex.h | 5 -
arch/x86/include/asm/mutex_32.h | 110 ----------
arch/x86/include/asm/mutex_64.h | 127 -----------
arch/xtensa/include/asm/mutex.h | 9 -
drivers/gpu/drm/i915/i915_gem_shrinker.c | 26 +--
include/asm-generic/mutex-dec.h | 88 --------
include/asm-generic/mutex-null.h | 19 --
include/asm-generic/mutex-xchg.h | 120 -----------
include/asm-generic/mutex.h | 9 -
include/linux/mutex-debug.h | 24 ---
include/linux/mutex.h | 46 ++--
kernel/Kconfig.locks | 2 +-
kernel/locking/mutex-debug.c | 13 --
kernel/locking/mutex-debug.h | 10 -
kernel/locking/mutex.c | 347 +++++++++++++++----------------
kernel/locking/mutex.h | 26 ---
kernel/sched/core.c | 2 +-
47 files changed, 199 insertions(+), 1323 deletions(-)