Skip to content

Cleanups/bugfixes for large systems and TREE_PREEMPT_RCU

Paul E. McKenney lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add WARN_ON_ONCE() consistency checks covering state transitionskernel/rcutree.c kernel/rcutree_plugin.h+23 -101 reply
2/3Apply results of code inspection of kernel/rcutree_plugin.hkernel/rcutree.c kernel/rcutree_plugin.h+11 -267 replies
3/3Fix thinko in commit #de078d875, actually initialize full treekernel/rcutree.c kernel/rcutree_plugin.h+7 -81 reply

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] Cleanups/bugfixes for large systems and TREE_PREEMPT_RCU

This set of patches does some cleanups and fixes a bug that prevents TREE_PREEMPT_RCU from running reliably on large systems (more than 64 CPUs, or on 32-bit systems, more than 32 CPUs). The patches are as follows:

1. Add WARN_ON_ONCE() consistency checks to catch bugs. These
are all on slowpaths, so are appropriate for production use.

2. Apply the results of a code walkthrough of rcutree_plugin.h.
This includes a fix for a theoretical race that could result in excessively long RCU grace periods, or perhaps even hangs/OOMs.

3. Fix a bug introduced in a bugfix commit #de078d875 that caused
large systems to only partially initialize the fields in the rcu_node tree. TREE_RCU doesn't care about any of these fields, which explains why only TREE_PREEMPT_RCU was broken.

With these fixes, large systems using TREE_PREEMPT_RCU pass moderate rcutorture runs (but with Josh Triplett's mods that force frequent preemption within RCU read-side critical sections). I am sure that there are more bugs, but these fixes get things much closer.

 b/kernel/rcutree.c        |   13 +++++++++----
 b/kernel/rcutree_plugin.h |   21 ++++++++++++++-------
 kernel/rcutree.c          |   38 +++++++++-----------------------------
 kernel/rcutree_plugin.h   |   16 +++++++++-------
 4 files changed, 41 insertions(+), 47 deletions(-)