linux/kernel/rcu
Paul E. McKenney 360e0da67e rcu: Add funnel locking to rcu_start_this_gp()
The rcu_start_this_gp() function had a simple form of funnel locking that
used only the leaves and root of the rcu_node tree, which is fine for
systems with only a few hundred CPUs, but sub-optimal for systems having
thousands of CPUs.  This commit therefore adds full-tree funnel locking.

This variant of funnel locking is unusual in the following ways:

1.	The leaf-level rcu_node structure's ->lock is held throughout.
	Other funnel-locking implementations drop the leaf-level lock
	before progressing to the next level of the tree.

2.	Funnel locking can be started at the root, which is convenient
	for code that already holds the root rcu_node structure's ->lock.
	Other funnel-locking implementations start at the leaves.

3.	If an rcu_node structure other than the initial one believes
	that a grace period is in progress, it is not necessary to
	go further up the tree.  This is because grace-period cleanup
	scans the full tree, so that marking the need for a subsequent
	grace period anywhere in the tree suffices -- but only if
	a grace period is currently in progress.

4.	It is possible that the RCU grace-period kthread has not yet
	started, and this case must be handled appropriately.

However, the general approach of using a tree to control lock contention
is still in place.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
2018-05-15 10:30:37 -07:00
..
Kconfig rcu: Drive TASKS_RCU directly off of PREEMPT 2017-08-17 07:26:04 -07:00
Kconfig.debug rcu: Move RCU debug Kconfig options to kernel/rcu 2017-06-08 18:52:44 -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/segcblist: Include rcupdate.h 2017-10-19 12:13:36 -07:00
rcu_segcblist.h rcu: Remove unused RCU list functions 2017-07-25 13:04:49 -07:00
rcu.h rcu: Create RCU-specific workqueues with rescuers 2018-02-23 15:14:40 -08:00
rcuperf.c torture: Provide more sensible nreader/nwriter defaults for rcuperf 2018-02-20 16:22:01 -08:00
rcutorture.c rcutorture: Record which grace-period primitives are tested 2018-02-20 16:21:58 -08:00
srcutiny.c srcu: Move rcu_scheduler_starting() from Tiny RCU to Tiny SRCU 2017-07-24 16:03:22 -07:00
srcutree.c Merge branches 'fixes.2018.02.23a', 'srcu.2018.02.20a' and 'torture.2018.02.20a' into HEAD 2018-02-23 15:15:41 -08:00
sync.c doc: Fix various RCU docbook comment-header problems 2017-10-19 22:26:11 -04:00
tiny.c srcu: Move rcu_scheduler_starting() from Tiny RCU to Tiny SRCU 2017-07-24 16:03:22 -07:00
tree_exp.h rcu: Create RCU-specific workqueues with rescuers 2018-02-23 15:14:40 -08:00
tree_plugin.h rcu: Make rcu_start_future_gp() caller select grace period 2018-05-15 10:30:32 -07:00
tree.c rcu: Add funnel locking to rcu_start_this_gp() 2018-05-15 10:30:37 -07:00
tree.h rcu: Convert ->need_future_gp[] array to boolean 2018-05-15 10:29:46 -07:00
update.c rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules 2017-12-07 19:51:49 -05:00