Skip to content

RFC Fix cpuidle_idle_call() RCU usage

Paul E. McKenney lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rcu: Allow nesting of rcu_idle_enter() and rcu_idle_exit()kernel/rcu.h kernel/rcutiny.c kernel/rcutree.c+42 -110 replies
2/3rcu: Add RCU_NONIDLE() for idle-loop RCU read-side critical sectionsinclude/linux/rcupdate.h kernel/rcutiny.c kernel/rcutree.c+31 -00 replies
3/3cpuidle: Inform RCU of read-side critical sectionsdrivers/cpuidle/cpuidle.c+8 -41 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosh TriplettDeepthi Dharwar
SeriesR-b
1/3
2/3
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 0/3] Fix cpuidle_idle_call() RCU usage

Hello!

This patch series is a second attempt to fix the idle-loop uses of RCU, see https://lkml.org/lkml/2012/2/1/741 for v1. Where the first series attempted to drive rcu_idle_enter() and rcu_idle_exit() further down into the Linux kernels multitude of idle loops, this patch instead marks specific idle-loop operations containing RCU read-side critical sections, as suggested by Nicolas Pitre and Steven Rostedt. The possibility of code shared between idle and non-idle also requires the ability to nest rcu_idle_enter() calls. The individual patches are as follows:

1. Allow nesting of rcu_idle_enter() and rcu_idle_exit().
2. Add an RCU_NONIDLE() macro to enclose idle-loop code that
contains RCU read-side critical sections.
3. Use RCU_NONIDLE() to protect cpuidle_idle_call()'s tracepoints.

This patchset has the distinct advantage of avoiding touching any architecture-specific code. ;-)

Thanx, Paul

------------------------------------------------------------------------

 b/drivers/cpuidle/cpuidle.c |   12 ++++++++----
 b/include/linux/rcupdate.h  |   27 +++++++++++++++++++++++++++
 b/kernel/rcu.h              |   18 +++++++++++++++++-
 b/kernel/rcutiny.c          |   16 ++++++++++++----
 b/kernel/rcutree.c          |   19 +++++++++++++------
 kernel/rcutiny.c            |    2 ++
 kernel/rcutree.c            |    2 ++
 7 files changed, 81 insertions(+), 15 deletions(-)