public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT RFC PULL rcu/urgent] Make RCU synchronous grace periods work throughout boot
@ 2017-01-15 20:30 Paul E. McKenney
  2017-01-16  6:51 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2017-01-15 20:30 UTC (permalink / raw)
  To: mingo
  Cc: linux-kernel, lv.zheng, bp, rjw, stan.kain, waffolz,
	emanuel.castelo, bpesavento, fredbezies, torvalds

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(-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GIT RFC PULL rcu/urgent] Make RCU synchronous grace periods work throughout boot
  2017-01-15 20:30 [GIT RFC PULL rcu/urgent] Make RCU synchronous grace periods work throughout boot Paul E. McKenney
@ 2017-01-16  6:51 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2017-01-16  6:51 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, lv.zheng, bp, rjw, stan.kain, waffolz,
	emanuel.castelo, bpesavento, fredbezies, torvalds


* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> 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(-)

Pulled into tip:rcu/urgent, thanks a lot Paul! I'll get this to Linus ASAP.

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-16  6:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-15 20:30 [GIT RFC PULL rcu/urgent] Make RCU synchronous grace periods work throughout boot Paul E. McKenney
2017-01-16  6:51 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox