aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
authorHou Tao <[email protected]>2020-09-15 14:07:50 +0000
committerPeter Zijlstra <[email protected]>2020-09-16 14:26:56 +0000
commite6b1a44eccfcab5e5e280be376f65478c3b2c7a2 (patch)
tree2175cb1bc02e8b795a2ebb5d3fe5263539e5cb4f /fs/proc/array.c
parentlocking/lockdep: Fix "USED" <- "IN-NMI" inversions (diff)
downloadkernel-e6b1a44eccfcab5e5e280be376f65478c3b2c7a2.tar.gz
kernel-e6b1a44eccfcab5e5e280be376f65478c3b2c7a2.zip
locking/percpu-rwsem: Use this_cpu_{inc,dec}() for read_count
The __this_cpu*() accessors are (in general) IRQ-unsafe which, given that percpu-rwsem is a blocking primitive, should be just fine. However, file_end_write() is used from IRQ context and will cause load-store issues on architectures where the per-cpu accessors are not natively irq-safe. Fix it by using the IRQ-safe this_cpu_*() for operations on read_count. This will generate more expensive code on a number of platforms, which might cause a performance regression for some of the other percpu-rwsem users. If any such is reported, we can consider alternative solutions. Fixes: 70fe2f48152e ("aio: fix freeze protection of aio writes") Signed-off-by: Hou Tao <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Will Deacon <[email protected]> Acked-by: Oleg Nesterov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'fs/proc/array.c')
0 files changed, 0 insertions, 0 deletions