linux-stable/kernel/rcu
Paul E. McKenney e015a34112 rcu: Avoid self-IPI in sync_sched_exp_online_cleanup()
The sync_sched_exp_online_cleanup() is invoked at online time to handle
the case where the start of an expedited grace period ran concurrently
with a CPU being taken offline and then immediately being placed online.
It checks to see if RCU needs an expedited quiescent state from the
incoming CPU, sending it an IPI if so.  However, it is quite possible
that sync_sched_exp_online_cleanup() is running on that CPU, in which
case it is considerably less overhead to simply request the quiescent
state locally instead of simulating a self-IPI.

This commit therefore places the last few lines of rcu_exp_handler()
into a new rcu_exp_need_qs() function, which is invoked both by
rcu_exp_handler() and by sync_sched_exp_online_cleanup() in the self-IPI
case.

This also reduces the rcu_exp_handler() function's state space by
removing the direct call that this smp_call_function_single() uses to
emulate the requested self-IPI.  This in turn will allow tighter error
checking in rcu_is_cpu_rrupt_from_idle().

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
2019-05-25 14:50:50 -07:00
..
Kconfig time: Move CONTEXT_TRACKING to kernel/time/Kconfig 2019-01-15 11:16:41 +01: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.h The major changes in this tracing update includes: 2019-05-15 16:05:47 -07:00
rcu_segcblist.c rcu/rcu_segcblist: Convert to SPDX license identifier 2019-02-09 08:43:40 -08:00
rcu_segcblist.h rcu/rcu_segcblist: Convert to SPDX license identifier 2019-02-09 08:43:40 -08:00
rcuperf.c rcuperf: Fix cleanup path for invalid perf_type strings 2019-03-26 14:42:53 -07:00
rcutorture.c Merge branches 'consolidate.2019.04.09a', 'doc.2019.03.26b', 'fixes.2019.03.26b', 'srcu.2019.03.26b', 'stall.2019.03.26b' and 'torture.2019.03.26b' into HEAD 2019-04-09 08:08:13 -07:00
srcutiny.c srcu: Remove cleanup_srcu_struct_quiesced() 2019-03-26 14:39:24 -07:00
srcutree.c srcu: Remove cleanup_srcu_struct_quiesced() 2019-03-26 14:39:24 -07:00
sync.c rcu/sync: Convert to SPDX license identifier 2019-02-09 08:43:59 -08:00
tiny.c rcu: rcu_qs -- Use raise_softirq_irqoff to not save irqs twice 2019-03-26 14:37:49 -07:00
tree.c rcu: Inline invoke_rcu_callbacks() into its sole remaining caller 2019-05-25 14:50:49 -07:00
tree.h rcu: Use irq_work to get scheduler's attention in clean context 2019-05-25 14:50:49 -07:00
tree_exp.h rcu: Avoid self-IPI in sync_sched_exp_online_cleanup() 2019-05-25 14:50:50 -07:00
tree_plugin.h rcu: Use irq_work to get scheduler's attention in clean context 2019-05-25 14:50:49 -07:00
tree_stall.h rcu: Fix nohz status in stall warning 2019-03-26 14:42:00 -07:00
update.c rcu: Move RCU CPU stall-warning code out of update.c 2019-03-26 14:40:13 -07:00