linux/arch/powerpc/platforms
Reza Arbab 9eab9901b0 powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage
We've encountered a performance issue when multiple processors stress
{get,put}_mmio_atsd_reg(). These functions contend for
mmio_atsd_usage, an unsigned long used as a bitmask.

The accesses to mmio_atsd_usage are done using test_and_set_bit_lock()
and clear_bit_unlock(). As implemented, both of these will require
a (successful) stwcx to that same cache line.

What we end up with is thread A, attempting to unlock, being slowed by
other threads repeatedly attempting to lock. A's stwcx instructions
fail and retry because the memory reservation is lost every time a
different thread beats it to the punch.

There may be a long-term way to fix this at a larger scale, but for
now resolve the immediate problem by gating our call to
test_and_set_bit_lock() with one to test_bit(), which is obviously
implemented without using a store.

Fixes: 1ab66d1fba ("powerpc/powernv: Introduce address translation services for Nvlink2")
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Acked-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-08-03 20:09:01 +10:00
..
4xx powerpc/4xx: Fix error return path in ppc4xx_msi_probe() 2018-08-03 20:08:20 +10:00
8xx
40x
44x
52xx powerpc/mpc5200: Remove VLA usage 2018-07-03 12:00:54 +10:00
82xx
83xx
85xx
86xx
512x
amigaone
cell powerpc: clean the inclusion of stringify.h 2018-07-30 22:48:17 +10:00
chrp chrp/nvram.c: add MODULE_LICENSE() 2018-07-19 14:38:46 +10:00
embedded6xx powerpc: wii: Remove outdated comment about memory fixups 2018-07-02 23:54:27 +10:00
maple
pasemi
powermac powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
powernv powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage 2018-08-03 20:09:01 +10:00
ps3
pseries powerpc/pseries: fix EEH recovery of some IOV devices 2018-07-31 19:56:46 +10:00
fsl_uli1575.c
Kconfig
Kconfig.cputype powerpc: Enable kernel XZ compression option on BOOK3S_32 2018-07-04 22:41:10 +10:00
Makefile