[GIT RFC PULL rcu/urgent] Make RCU synchronous grace periods work throughout boot

From: Paul E. McKenney
Date: Sun Jan 15 2017 - 15:30:58 EST


Hello, Ingo,

This series contains a pair of commits that permit RCU synchronous grace
periods (synchronize_rcu() and friends) to work correctly throughout boot.
This eliminates the current "dead time" starting when the scheduler spawns
its first taks and ending when the last of RCU's kthreads is spawned
(this last happens during early_initcall() time). Although RCU's
synchronous grace periods have long been documented as not working
during this time, prior to 4.9, the expedited grace periods worked by
accident, and some ACPI code came to rely on this unintentional behavior.
(Note that this unintentional behavior was -not- reliable. For example,
failures from ACPI could occur on !SMP systems and on systems booting
with the rcu_normal kernel boot parameter.)

Either way, there is a bug that needs fixing, and the 4.9 switch of RCU's
expedited grace periods to workqueues could be considered to have caused
a regression. This series therefore makes RCU's expedited grace periods
operate correctly throughout the boot process. This has been demonstrated
to fix the problems ACPI was encountering, and has the added longer-term
benefit of simplifying RCU's behavior. I am therefore submitting this
RFC pull request for your consideration despite it being rather late in
the 4.10 process.

Please see the commit log of 52d7e48b86fc ("rcu: Narrow early boot
window of illegal synchronous grace periods") for more information on
the regression and the fix to RCU.

The following changes since commit a121103c922847ba5010819a3f250f1f7fc84ab8:

Linux 4.10-rc3 (2017-01-08 14:18:17 -0800)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/urgent

for you to fetch changes up to 52d7e48b86fc108e45a656d8e53e4237993c481d:

rcu: Narrow early boot window of illegal synchronous grace periods (2017-01-14 21:23:48 -0800)

----------------------------------------------------------------
Paul E. McKenney (2):
rcu: Remove cond_resched() from Tiny synchronize_sched()
rcu: Narrow early boot window of illegal synchronous grace periods

include/linux/rcupdate.h | 4 ++++
kernel/rcu/rcu.h | 1 +
kernel/rcu/tiny.c | 4 ----
kernel/rcu/tiny_plugin.h | 9 +++++++--
kernel/rcu/tree.c | 33 ++++++++++++++++++------------
kernel/rcu/tree_exp.h | 52 ++++++++++++++++++++++++++++++++++++++----------
kernel/rcu/tree_plugin.h | 2 +-
kernel/rcu/update.c | 38 +++++++++++++++++++++++++++--------
8 files changed, 104 insertions(+), 39 deletions(-)