Skip to content

rcu: prevent hangs by simplifying rcu_barrier/CPU-hotplug, fix lockdep complaint

Paul E. McKenney lkml 1 version Applied

Status from this message: Applied, thanks Paul!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3rcu: move rcu_barrier() to rcutreekernel/rcupdate.c kernel/rcutree.c+120 -1191 reply
2/3rcu: make hot-unplugged CPU relinquish its own RCU callbackskernel/rcutree.c kernel/rcutree.h kernel/rcutree_plugin.h +1 more+125 -753 replies
3/3rcu: place root rcu_node structure in separate lockdep classkernel/rcutree.c+3 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH tip/core/rcu 0/3] rcu: prevent hangs by simplifying rcu_barrier/CPU-hotplug, fix lockdep complaint

This patchset fixes a couple of issues with TREE_PREEMPT_RCU:

1. The current implementation of rcu_barrier() waits for any
prior CPU-hotplug operation to complete. This code path has resulted in some hangs, so first move this code from rcupdate.c to rcutree.c and then use a simpler algorithm that avoids the waiting, eliminating the possibility of such hangs.

2. The lockdep facility complains from time to time due to the
fact that certain combinations of CPU-hotplug operations can cause the TREE_PREEMPT_RCU code to acquire the root rcu_node structure's lock while holding a leaf rcu_node structure's lock. This patch places the root rcu_node structure's lock into its own lockdep class to prevent this false positive.

Ingo, please rewind tip/core/rcu to commit #135c8aea before applying this series, as these patches really need to go into 2.6.32. Reworked and retested rcutiny (for 2.6.33, as Linus requested) will follow in a few days. Or more patches for more bug fixes, as the case may be. ;-)

 b/kernel/rcupdate.c       |  120 -----------------------------------
 b/kernel/rcutree.c        |  120 +++++++++++++++++++++++++++++++++++
 b/kernel/rcutree.h        |   11 ++-
 b/kernel/rcutree_plugin.h |   34 ++++++++++
 b/kernel/rcutree_trace.c  |    5 -
 kernel/rcutree.c          |  156 ++++++++++++++++++++++++----------------------
 6 files changed, 248 insertions(+), 198 deletions(-)