linux/kernel/rcu
Paul E. McKenney 65963d2461 rcu: Make expedited RCU CPU selection avoid unnecessary stores
This commit reworks the first loop in sync_rcu_exp_select_cpus()
to avoid doing unnecssary stores to other CPUs' rcu_data
structures.  This speeds up that first loop by roughly a factor of
two on an old x86 system.  In the case where the system is mostly
idle, this loop incurs a large fraction of the overhead of the
synchronize_rcu_expedited().  There is less benefit on busy systems
because the overhead of the smp_call_function_single() in the second
loop dominates in that case.

However, it is not unusual to do configuration chances involving
RCU grace periods (both expedited and normal) while the system is
mostly idle, so this optimization is worth doing.

While we are in the area, this commit also adds parentheses to arguments
used by the for_each_leaf_node_possible_cpu() macro.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2018-02-20 16:12:29 -08: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: Make expedited RCU CPU selection avoid unnecessary stores 2018-02-20 16:12:29 -08:00
rcuperf.c torture: Eliminate torture_runnable and perf_runnable 2017-12-11 09:18:29 -08:00
rcutorture.c torture: Eliminate torture_runnable and perf_runnable 2017-12-11 09:18:29 -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 rcu: Fix misprint in srcu_funnel_exp_start 2018-02-20 16:12:27 -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: Make expedited RCU CPU selection avoid unnecessary stores 2018-02-20 16:12:29 -08:00
tree_plugin.h rcu: Use wrapper for lockdep asserts 2018-02-20 16:12:26 -08:00
tree.c rcu: Use wrapper for lockdep asserts 2018-02-20 16:12:26 -08:00
tree.h rcu: Remove redundant nxttail index macro define 2018-02-20 16:10:31 -08:00
update.c rcu: Export init_rcu_head() and destroy_rcu_head() to GPL modules 2017-12-07 19:51:49 -05:00