Backport compact NUMA-aware lock feature v15 from linux maillist.
bugzilla: https://gitee.com/openeuler/kernel/issues/I8T8XV Reference: https://lore.kernel.org/linux-arm-kernel/20210514200743.3026725-1-alex.kogan...
Alex Kogan (6): locking/qspinlock: Rename mcs lock/unlock macros and make them more generic locking/qspinlock: Refactor the qspinlock slow path locking/qspinlock: Introduce CNA into the slow path of qspinlock locking/qspinlock: Introduce starvation avoidance into CNA locking/qspinlock: Avoid moving certain threads between waiting queues in CNA locking/qspinlock: Introduce the shuffle reduction optimization into CNA
Wei Li (2): locking/qspinlock: Disable CNA by default config: Enable CONFIG_NUMA_AWARE_SPINLOCKS on x86
.../admin-guide/kernel-parameters.txt | 18 + arch/arm/include/asm/mcs_spinlock.h | 6 +- arch/x86/Kconfig | 20 + arch/x86/configs/openeuler_defconfig | 1 + arch/x86/include/asm/qspinlock.h | 4 + arch/x86/kernel/alternative.c | 4 + include/asm-generic/mcs_spinlock.h | 4 +- kernel/locking/mcs_spinlock.h | 20 +- kernel/locking/qspinlock.c | 82 +++- kernel/locking/qspinlock_cna.h | 425 ++++++++++++++++++ kernel/locking/qspinlock_paravirt.h | 2 +- 11 files changed, 563 insertions(+), 23 deletions(-) create mode 100644 kernel/locking/qspinlock_cna.h