linux-stable/kernel/rcu
Frederic Weisbecker 8d346d438f rcu/nocb: Provide basic callback offloading state machine bits
Offloading and de-offloading RCU callback processes must be done
carefully.  There must never be a time at which callback processing is
disabled because the task driving the offloading or de-offloading might be
preempted or otherwise stalled at that point in time, which would result
in OOM due to calbacks piling up indefinitely.  This implies that there
will be times during which a given CPU's callbacks might be concurrently
invoked by both that CPU's RCU_SOFTIRQ handler (or, equivalently, that
CPU's rcuc kthread) and by that CPU's rcuo kthread.

This situation could fatally confuse both rcu_barrier() and the
CPU-hotplug offlining process, so these must be excluded during any
concurrent-callback-invocation period.  In addition, during times of
concurrent callback invocation, changes to ->cblist must be protected
both as needed for RCU_SOFTIRQ and as needed for the rcuo kthread.

This commit therefore defines and documents the states for a state
machine that coordinates offloading and deoffloading.

Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Neeraj Upadhyay <neeraju@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Inspired-by: Paul E. McKenney <paulmck@kernel.org>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-01-06 16:24:19 -08:00
..
Kconfig rcu: Clarify nocb kthreads naming in RCU_NOCB_CPU config 2020-11-19 19:37:16 -08:00
Kconfig.debug Merge branch 'strictgp.2020.08.24a' into HEAD 2020-09-03 09:47:42 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h rcutorture: Make grace-period kthread report match RCU flavor being tested 2020-11-02 17:12:43 -08:00
rcu_segcblist.c rcu/nocb: Provide basic callback offloading state machine bits 2021-01-06 16:24:19 -08:00
rcu_segcblist.h rcu/nocb: Provide basic callback offloading state machine bits 2021-01-06 16:24:19 -08:00
rcuscale.c rcuscale: Prevent hangs for invalid arguments 2020-11-06 17:13:51 -08:00
rcutorture.c Merge branches 'cpuinfo.2020.11.06a', 'doc.2020.11.06a', 'fixes.2020.11.19b', 'lockdep.2020.11.02a', 'tasks.2020.11.06a' and 'torture.2020.11.06a' into HEAD 2020-11-19 19:37:47 -08:00
refscale.c refscale: Prevent hangs for invalid arguments 2020-11-06 17:13:51 -08:00
srcutiny.c rcu: Use CONFIG_PREEMPTION where appropriate 2019-12-09 12:37:51 -08:00
srcutree.c rcu/segcblist: Add counters to segcblist datastructure 2021-01-06 16:24:19 -08:00
sync.c rcu/sync: Simplify the state machine 2019-05-28 09:05:23 -07:00
tasks.h rcu-tasks: Make the units of ->init_fract be jiffies 2020-11-06 17:17:59 -08:00
tiny.c rcu: Rename *_kfree_callback/*_kfree_rcu_offset/kfree_call_* 2020-06-29 11:59:25 -07:00
tree.c rcu/nocb: Provide basic callback offloading state machine bits 2021-01-06 16:24:19 -08:00
tree.h rcu: Prevent lockdep-RCU splats on lock acquisition/release 2020-11-19 19:37:17 -08:00
tree_exp.h rcu: Initialize at declaration time in rcu_exp_handler() 2020-08-24 18:36:03 -07:00
tree_plugin.h rcu: Do not report strict GPs for outgoing CPUs 2020-11-19 19:37:17 -08:00
tree_stall.h rcu: Panic after fixed number of stalls 2020-11-19 19:37:16 -08:00
update.c Merge tag 'core-rcu-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-10-18 14:34:50 -07:00