aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/radix-tree/linux
diff options
context:
space:
mode:
authorPeter Zijlstra <[email protected]>2016-07-14 20:08:46 +0200
committerIngo Molnar <[email protected]>2016-08-10 14:34:01 +0200
commit80127a39681bd68c959f0953f84a830cbd7c3b1c (patch)
tree223bcc2a5cbec5c0873f8fae85a98797f94e6c56 /tools/testing/radix-tree/linux
parent08be8f63c40c030b5cf95b4368e314e563a86301 (diff)
locking/percpu-rwsem: Optimize readers and reduce global impact
Currently the percpu-rwsem switches to (global) atomic ops while a writer is waiting; which could be quite a while and slows down releasing the readers. This patch cures this problem by ordering the reader-state vs reader-count (see the comments in __percpu_down_read() and percpu_down_write()). This changes a global atomic op into a full memory barrier, which doesn't have the global cacheline contention. This also enables using the percpu-rwsem with rcu_sync disabled in order to bias the implementation differently, reducing the writer latency by adding some cost to readers. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Oleg Nesterov <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Paul McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] [ Fixed modular build. ] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/testing/radix-tree/linux')
0 files changed, 0 insertions, 0 deletions