Skip to content

SRCU callback parallelization for 4.12

Paul E. McKenney kvm kvm-ppc linux-mm linuxppc-dev lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest40 patches 19 repliesIn review
  2. v2 posting 2/239 patches 8 repliesSuperseded
  3. v2 posting 1/20 of 40 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v140 patches27 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/40rcu: Maintain special bits at bottom of ->dynticks counterinclude/linux/rcutiny.h kernel/rcu/tree.c kernel/rcu/tree.h+67 -160 replies
2/40rcu: Make arch select smp_mb__after_unlock_lock() strengtharch/Kconfig arch/powerpc/Kconfig include/linux/rcupdate.h+7 -30 replies
3/40srcu: Consolidate batch checking into rcu_all_batches_empty()kernel/rcu/srcu.c+13 -80 replies
4/40srcu: Check for tardy grace-period activity in cleanup_srcu_struct()kernel/rcu/srcu.c+13 -20 replies
5/40rcu: Semicolon inside RCU_TRACE() for rcu.hkernel/rcu/rcu.h+2 -24 replies
6/40rcu: Semicolon inside RCU_TRACE() for Tiny RCUkernel/rcu/tiny.c kernel/rcu/tiny_plugin.h+12 -120 replies
7/40rcu: Semicolon inside RCU_TRACE() for tree.ckernel/rcu/tree.c+4 -40 replies
8/40rcu: Pull rcu_sched_qs_mask into rcu_dynticks structureDocumentation/RCU/Design/Data-Structures/Data-Structures.html kernel/rcu/tree.c kernel/rcu/tree.h+14 -80 replies
9/40rcu: Pull rcu_qs_ctr into rcu_dynticks structureDocumentation/RCU/Design/Data-Structures/Data-Structures.html kernel/rcu/tree.c kernel/rcu/tree.h +1 more+19 -150 replies
10/40rcu: Eliminate flavor scan in rcu_momentary_dyntick_idle()Documentation/RCU/Design/Data-Structures/Data-Structures.html kernel/rcu/tree.c kernel/rcu/tree.h+15 -540 replies
11/40rcu: Place guard on rcu_all_qs() and rcu_note_context_switch() actionsDocumentation/RCU/Design/Data-Structures/Data-Structures.html kernel/rcu/tree.c kernel/rcu/tree.h +2 more+44 -180 replies
12/40rcu: Default RCU_FANOUT_LEAF to 16 unless explicitly changedkernel/rcu/tree.h+1 -50 replies
13/40srcu: Abstract multi-tail callback list handlingkernel/rcu/rcu_segcblist.h kernel/rcu/tree.c kernel/rcu/tree.h +2 more+780 -3090 replies
14/40srcu: Allow SRCU to access rcu_scheduler_activeinclude/linux/rcutiny.h kernel/rcu/tiny_plugin.h kernel/rcu/tree.c +2 more+43 -380 replies
15/40srcu: Allow early boot use of synchronize_srcu()kernel/rcu/srcu.c+2 -00 replies
16/40rcu: Add single-element dequeue functions to rcu_segcblistkernel/rcu/rcu_segcblist.h+45 -00 replies
17/40srcu: Move rcu_seq_start() and friends to rcu.hkernel/rcu/rcu.h kernel/rcu/tree.c+40 -350 replies
18/40rcu: Expedited wakeups need to be fully orderedkernel/rcu/tree_exp.h+2 -00 replies
19/40rcu: Fix warning in rcu_seq_end()kernel/rcu/rcu.h+1 -10 replies
20/40srcu: Push srcu_advance_batches() fastpath into common casekernel/rcu/srcu.c+7 -200 replies
21/40srcu: Move to state-based grace-period sequencinginclude/linux/srcu.h kernel/rcu/srcu.c+69 -520 replies
22/40srcu: Add grace-period sequence numbersinclude/linux/srcu.h kernel/rcu/srcu.c+24 -40 replies
23/40srcu: Use rcu_segcblist to track SRCU callbacksinclude/linux/rcu_segcblist.h include/linux/srcu.h kernel/rcu/rcu.h +3 more+721 -8180 replies
24/40srcu: Move combining-tree definitions for SRCU's benefitinclude/linux/rcu_node_tree.h kernel/rcu/tree.h+103 -700 replies
25/40srcu: Move rcu_init_levelspread() to rcu_tree_node.hinclude/linux/rcu_node_tree.h kernel/rcu/rcu.h kernel/rcu/srcu.c +2 more+38 -280 replies
26/40rcu: Remove redundant levelcnt[] array from rcu_init_one()kernel/rcu/tree.c+3 -60 replies
27/40srcu: Move rcu_node traversal macros to rcu.hkernel/rcu/rcu.h kernel/rcu/tree.h+35 -350 replies
28/40srcu: Make num_rcu_lvl[] array be externalkernel/rcu/rcu.h kernel/rcu/tree.c+2 -10 replies
29/40srcu: Fix bogus try_check_zero() commentkernel/rcu/srcu.c+3 -40 replies
30/40srcu: Improve rcu_seq grace-period-counter abstractionkernel/rcu/rcu.h kernel/rcu/tree_exp.h+29 -90 replies
31/40srcu: Allow a second bit in rcu_seq for SRCU statekernel/rcu/rcu.h+1 -10 replies
32/40srcu: Merge ->srcu_state into ->srcu_gp_seqinclude/linux/srcu.h kernel/rcu/rcu.h kernel/rcu/srcu.c+46 -240 replies
33/40srcu: Crude control of expedited grace periodsinclude/linux/srcu.h kernel/rcu/srcu.c+47 -380 replies
34/40mm: Use static initialization for "srcu"mm/mmu_notifier.c+1 -130 replies
35/40srcu: Create a tiny SRCUinclude/linux/srcu.h include/linux/srcutiny.h include/linux/srcutree.h +4 more+411 -620 replies
36/40srcutorture: Print Tiny SRCU reader statisticskernel/rcu/rcutorture.c+11 -40 replies
37/40srcu: Introduce CLASSIC_SRCU Kconfig optioninclude/linux/srcu.h include/linux/srcuclassic.h init/Kconfig +4 more+934 -1550 replies
38/40srcu: Parallelize callback handlinginclude/linux/rcu_segcblist.h include/linux/srcutree.h kernel/rcu/rcutorture.c +3 more+645 -1500 replies
39/40srcu: Expedite srcu_schedule_cbs_snp() callback invocationkernel/rcu/srcutree.c+2 -10 replies
40/40rcu: Make non-preemptive schedule be Tasks RCU quiescent stateinclude/linux/rcupdate.h include/linux/rcutiny.h include/linux/rcutree.h +3 more+43 -1115 replies

Reviews trailers per patch

4 of 40 patches have a Reviewed-by or Acked-by.

PatchMichael EllermanJosh TriplettMarc Zyngier
1/40R-b
2/40A-b R-b
3/40R-b
4/40R-b
5/40
6/40
7/40
8/40
9/40
10/40
11/40
12/40
13/40
14/40
15/40
16/40
17/40
18/40
19/40
20/40
21/40
22/40
23/40
24/40
25/40
26/40
27/40
28/40
29/40
30/40
31/40
32/40
33/40
34/40
35/40
36/40
37/40
38/40
39/40T-b
40/40

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 tip/core/rcu 0/40] SRCU callback parallelization for 4.12

Hello!

This v3 series moves SRCU from its traditional single per-srcu_struct callback queue to per-srcu_struct/per-CPU callback queues. This involves abstracting functionality from Tree RCU, which results in a large conflict footprint, which in turn results in some otherwise unrelated patches coming along for the ride.

1. Maintain special bits at bottom of ->dynticks counter.
This is for some upcoming MM work. My intent was to hold it until that work was ready, but merge conflicts dictated otherwise. If the MM work does not appear soonish, I will manually revert this patch.

2. Make arch select smp_mb__after_unlock_lock() strength, which
gets rid of an arch-specific #ifdef.

3. Consolidate SRCU batch checking into rcu_all_batches_empty().

4. Check for tardy grace-period activity in cleanup_srcu_struct().

5-7. Semicolon inside RCU_TRACE() for various parts of RCU.

8. Pull rcu_sched_qs_mask into rcu_dynticks structure in order to
eliminate an isolated per-CPU variable.

9. Pull rcu_qs_ctr into rcu_dynticks structure.

10. Eliminate flavor scan in rcu_momentary_dyntick_idle() to
reduce semi-common-case context-switch overhead.

11. Place guard on rcu_all_qs() and rcu_note_context_switch()
actions to reduce common-case scheduler-fastpath overhead.

12. Default RCU_FANOUT_LEAF to 16 unless explicitly changed.

13. Abstract multi-tail callback list handling for SRCU.

14. Allow SRCU to access rcu_scheduler_active.

15. Allow early boot use of synchronize_srcu(), though not yet
mid-boot use.

16. Add single-element dequeue functions to rcu_segcblist for
debug use.

17. Move rcu_seq_start() and friends to rcu.h for SRCU's benefit.

18. Expedited wakeups need to be fully ordered.

19. Fix warning in rcu_seq_end().

20. Push srcu_advance_batches() fastpath into common case as a
step towards callback parallelization.

21. Move to state-based grace-period sequencing, also as a step
towards callback parallelization.

22. Add grace-period sequence numbers to SRCU.

23. Use rcu_segcblist to track SRCU callbacks.

24. Move combining-tree definitions for SRCU's benefit.

25. Move rcu_init_levelspread() to rcu_tree_node.h for SRCU's benefit.

26. Remove redundant levelcnt[] array from rcu_init_one().

27. Move rcu_node traversal macros to rcu.h for SRCU's benefit.

28. Make num_rcu_lvl[] array be external for SRCU's benefit.

29. Fix bogus try_check_zero() comment.

30. Improve rcu_seq grace-period-counter abstraction for SRCU's
benefit.

31. Allow a second bit in rcu_seq for SRCU state.

32. Merge ->srcu_state into ->srcu_gp_seq to allow atomic updates.

33. Provide crude control of expedited SRCU grace periods.

34. Use static initialization for "srcu" in mm/mmu_notifier.c.

35. Create a tiny SRCU for bloatwatch/tinification.

36. Print Tiny SRCU reader statistics in rcutorture.

37. Introduce CLASSIC_SRCU Kconfig option for those who do not
wish to help debug Tree SRCU.

38. Parallelize SRCU callback handling.

39. Make expedited parallel SRCU callback handling really be fully
expedited.

40. Make non-preemptive schedule be Tasks RCU quiescent state.

Updates since v2:

o Apply Josh Triplett feedback.

o Fix a performance regression found by Marc Zyngier.

Updates since v1:

o Incorporate feedback from Peter Zijlstra.

o Dropped v1 patches 8-10 ("Make various parts of RCU do deferred
NOCB wakeups in order to prevent callback blockages, and thus hangs"). These patches turned out to be papering over a no-CBs CPU design flaw. There will be patches in v4.13 to fix the design flaw directly.

o Added v2 patch #34 ("Use static initialization for "srcu" in
mm/mmu_notifier.c"), moving it from its v1 location in the fixes series.

o Added v2 patch #39 ("Make non-preemptive schedule be Tasks RCU
quiescent state") for the benefit of upcoming ftrace work at Steve Rostedt's request.

Thanx, Paul

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

 /kernel/rcu/rcu_segcblist.h                                     |  670 -----
 b/Documentation/RCU/Design/Data-Structures/Data-Structures.html |   36 
 b/arch/Kconfig                                                  |    3 
 b/arch/powerpc/Kconfig                                          |    1 
 b/include/linux/rcu_node_tree.h                                 |  105 
 b/include/linux/rcu_segcblist.h                                 |  720 +++++
 b/include/linux/rcupdate.h                                      |   17 
 b/include/linux/rcutiny.h                                       |   24 
 b/include/linux/rcutree.h                                       |    5 
 b/include/linux/srcu.h                                          |  112 
 b/include/linux/srcuclassic.h                                   |  101 
 b/include/linux/srcutiny.h                                      |   81 
 b/include/linux/srcutree.h                                      |  171 +
 b/init/Kconfig                                                  |   33 
 b/kernel/rcu/Makefile                                           |    6 
 b/kernel/rcu/rcu.h                                              |  165 +
 b/kernel/rcu/rcu_segcblist.h                                    |  670 +++++
 b/kernel/rcu/rcutorture.c                                       |   39 
 b/kernel/rcu/srcu.c                                             |  856 +++---
 b/kernel/rcu/srcutiny.c                                         |  215 +
 b/kernel/rcu/srcutree.c                                         | 1255 ++++++++--
 b/kernel/rcu/tiny.c                                             |   20 
 b/kernel/rcu/tiny_plugin.h                                      |   13 
 b/kernel/rcu/tree.c                                             |  661 ++---
 b/kernel/rcu/tree.h                                             |  174 -
 b/kernel/rcu/tree_exp.h                                         |   25 
 b/kernel/rcu/tree_plugin.h                                      |   62 
 b/kernel/rcu/tree_trace.c                                       |   26 
 b/kernel/rcu/update.c                                           |   53 
 b/kernel/sched/core.c                                           |    2 
 b/mm/mmu_notifier.c                                             |   14 
 31 files changed, 4299 insertions(+), 2036 deletions(-)