linux_dsm_epyc7002/kernel/rcu
Paul E. McKenney 81c0b3d724 rcu/nocb: Avoid ->nocb_lock capture by corresponding CPU
A given rcu_data structure's ->nocb_lock can be acquired very frequently
by the corresponding CPU and occasionally by the corresponding no-CBs
grace-period and callbacks kthreads.  In particular, these two kthreads
will have frequent gaps between ->nocb_lock acquisitions that are roughly
a grace period in duration.  This means that any excessive ->nocb_lock
contention will be due to the CPU's acquisitions, and this in turn
enables a very naive contention-avoidance strategy to be quite effective.

This commit therefore modifies rcu_nocb_lock() to first
attempt a raw_spin_trylock(), and to atomically increment a
separate ->nocb_lock_contended across a raw_spin_lock().  This new
->nocb_lock_contended field is checked in __call_rcu_nocb_wake() when
interrupts are enabled, with a spin-wait for contending acquisitions
to complete, thus allowing the kthreads a chance to acquire the lock.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
2019-08-13 14:35:49 -07:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Kconfig.debug rcu: Add support for consolidated-RCU reader checking 2019-08-09 11:00:35 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rcu_segcblist.c rcu/nocb: Use rcu_segcblist for no-CBs CPUs 2019-08-13 14:35:49 -07:00
rcu_segcblist.h rcu/nocb: Use rcu_segcblist for no-CBs CPUs 2019-08-13 14:35:49 -07:00
rcu.h rcu: Add kernel parameter to dump trace after RCU CPU stall warning 2019-08-01 14:05:51 -07:00
rcuperf.c rcuperf: Make rcuperf kernel test more robust for !expedited mode 2019-08-01 14:30:22 -07:00
rcutorture.c rcutorture: Aggressive forward-progress tests shouldn't block shutdown 2019-08-01 14:30:22 -07:00
srcutiny.c srcu: Remove cleanup_srcu_struct_quiesced() 2019-03-26 14:39:24 -07:00
srcutree.c srcu: Avoid srcutorture security-based pointer obfuscation 2019-08-01 14:05:51 -07:00
sync.c rcu/sync: Simplify the state machine 2019-05-28 09:05:23 -07:00
tiny.c rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice 2019-03-26 14:37:49 -07:00
tree_exp.h rcu: Fix spelling mistake "greate"->"great" 2019-08-12 11:25:06 -07:00
tree_plugin.h rcu/nocb: Avoid ->nocb_lock capture by corresponding CPU 2019-08-13 14:35:49 -07:00
tree_stall.h rcu: Add kernel parameter to dump trace after RCU CPU stall warning 2019-08-01 14:05:51 -07:00
tree.c rcu/nocb: Avoid needless wakeups of no-CBs grace-period kthread 2019-08-13 14:35:49 -07:00
tree.h rcu/nocb: Avoid ->nocb_lock capture by corresponding CPU 2019-08-13 14:35:49 -07:00
update.c Merge branches 'consolidate.2019.08.01b', 'fixes.2019.08.12a', 'lists.2019.08.13a' and 'torture.2019.08.01b' into HEAD 2019-08-13 14:30:30 -07:00