Skip to content

Provide runtime switching of offloaded CPUs

Paul E. McKenney lkml rcu 1 version New

Get series with b4
b4 am 20210106013950.GA14663@paulmck-ThinkPad-P72

Versions newest first

  1. v1 Latest21 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21rcu/nocb: Turn enabled/offload states into a common flaginclude/linux/rcu_segcblist.h kernel/rcu/rcu_segcblist.c kernel/rcu/rcu_segcblist.h+28 -70 replies
2/21rcu/nocb: Provide basic callback offloading state machine bitsinclude/linux/rcu_segcblist.h kernel/rcu/rcu_segcblist.c kernel/rcu/rcu_segcblist.h +1 more+128 -30 replies
3/21rcu/nocb: Always init segcblist on CPU upkernel/rcu/tree.c+9 -30 replies
4/21rcu/nocb: De-offloading CB kthreadinclude/linux/rcupdate.h kernel/rcu/rcu_segcblist.c kernel/rcu/rcu_segcblist.h +2 more+123 -220 replies
5/21rcu/nocb: Don't deoffload an offline CPU with pending workkernel/rcu/tree_plugin.h+9 -00 replies
6/21rcu/nocb: De-offloading GP kthreadkernel/rcu/tree_plugin.h+51 -30 replies
7/21rcu/nocb: Re-offload supportinclude/linux/rcupdate.h kernel/rcu/tree_plugin.h+138 -220 replies
8/21rcu/nocb: Shutdown nocb timer on de-offloadingkernel/rcu/tree.h kernel/rcu/tree_plugin.h+12 -10 replies
9/21rcu/nocb: Flush bypass before setting SEGCBLIST_SOFTIRQ_ONLYkernel/rcu/tree_plugin.h+10 -10 replies
10/21rcu/nocb: Set SEGCBLIST_SOFTIRQ_ONLY at the very last stage of de-offloadingkernel/rcu/tree_plugin.h+8 -10 replies
11/21rcu/nocb: Only cond_resched() from actual offloaded batch processingkernel/rcu/tree.c+1 -20 replies
12/21rcu/nocb: Process batch locally as long as offloading isn't completekernel/rcu/rcu_segcblist.h kernel/rcu/tree.c+14 -10 replies
13/21rcu/nocb: Locally accelerate callbacks as long as offloading isn't completekernel/rcu/tree.c+3 -40 replies
14/21cpu/hotplug: Add lockdep_is_cpus_held()include/linux/cpu.h kernel/cpu.c+9 -00 replies
15/21timer: Add timer_curr_running()include/linux/timer.h kernel/time/timer.c+15 -00 replies
16/21rcutorture: Test runtime toggling of CPUs' callback offloadingDocumentation/admin-guide/kernel-parameters.txt kernel/rcu/rcutorture.c+95 -30 replies
17/21tools/rcutorture: Support nocb toggle in TREE01tools/testing/selftests/rcutorture/configs/rcu/TREE01.boot+3 -10 replies
18/21rcu/nocb: Add grace period and task state to show_rcu_nocb_state() outputkernel/rcu/rcu_segcblist.h kernel/rcu/tree_plugin.h+43 -70 replies
19/21rcu/nocb: Add nocb CB kthread list to show_rcu_nocb_state() outputkernel/rcu/tree_plugin.h+1 -00 replies
20/21rcu/nocb: Code-style nits in callback-offloading togglingkernel/rcu/rcu_segcblist.h kernel/rcu/tree_plugin.h+11 -180 replies
21/21rcu: Do any deferred nocb wakeups at CPU offline timekernel/rcu/tree.c+3 -00 replies

Reviews trailers per patch

None of the 21 patches has a Reviewed-by or Acked-by.

PatchPaul E. McKenneyBoqun Feng
1/21Inspired-by T-b
2/21Inspired-by T-b
3/21Inspired-by T-b
4/21Inspired-by T-b
5/21T-b
6/21Inspired-by T-b
7/21Inspired-by T-b
8/21Inspired-by T-b
9/21Inspired-by T-b
10/21Inspired-by T-b
11/21Inspired-by T-b
12/21Inspired-by T-b
13/21Inspired-by T-b
14/21
15/21T-b
16/21
17/21Inspired-by T-b
18/21
19/21
20/21
21/21

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 tip/core/rcu 0/21] Provide runtime switching of offloaded CPUs

Hello!

Currently, it is necessary to reboot to change a given CPU between invoking its own RCU callbacks via softirq and offloading callback invocation to an rcuo kthread. This series allows CPUs that were initially offloaded to be toggled back and forth at runtime, without requiring a reboot.

Note that you can boot with all CPUs offloaded, de-offload them as needed immediately after boot, and thereafter toggled back and forth as desired.

1. Turn enabled/offload states into a common flag, courtesy of
Frederic Weisbecker.

2. Provide basic callback offloading state machine bits, courtesy
of Frederic Weisbecker.

3. Always init segcblist on CPU up, courtesy of Frederic Weisbecker.

4. De-offloading CB kthread, courtesy of Frederic Weisbecker.

5. Don't deoffload an offline CPU with pending work, courtesy of
Frederic Weisbecker.

6. De-offloading GP kthread, courtesy of Frederic Weisbecker.

7. Re-offload support, courtesy of Frederic Weisbecker.

8. Shutdown nocb timer on de-offloading, courtesy of Frederic
Weisbecker.

9. Flush bypass before setting SEGCBLIST_SOFTIRQ_ONLY, courtesy of
Frederic Weisbecker.

10. Set SEGCBLIST_SOFTIRQ_ONLY at the very last stage of
de-offloading, courtesy of Frederic Weisbecker.

11. Only cond_resched() from actual offloaded batch processing,
courtesy of Frederic Weisbecker.

12. Process batch locally as long as offloading isn't complete,
courtesy of Frederic Weisbecker.

13. Locally accelerate callbacks as long as offloading isn't complete,
courtesy of Frederic Weisbecker.

14. Add lockdep_is_cpus_held(), courtesy of Frederic Weisbecker.

15. Add timer_curr_running(), courtesy of Frederic Weisbecker.

16. Test runtime toggling of CPUs' callback offloading.

17. Support nocb toggle in TREE01, courtesy of Frederic Weisbecker.

18. Add grace period and task state to show_rcu_nocb_state() output.

19. Add nocb CB kthread list to show_rcu_nocb_state() output.

20. Code-style nits in callback-offloading toggling.

21. Do any deferred nocb wakeups at CPU offline time.

Thanx, Paul

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

 Documentation/admin-guide/kernel-parameters.txt            |    8 
 include/linux/cpu.h                                        |    2 
 include/linux/rcu_segcblist.h                              |  121 +++
 include/linux/rcupdate.h                                   |    4 
 include/linux/timer.h                                      |    2 
 kernel/cpu.c                                               |    7 
 kernel/rcu/rcu_segcblist.c                                 |   17 
 kernel/rcu/rcu_segcblist.h                                 |   79 +-
 kernel/rcu/rcutorture.c                                    |   90 ++
 kernel/rcu/tree.c                                          |   31 
 kernel/rcu/tree.h                                          |    2 
 kernel/rcu/tree_plugin.h                                   |  433 +++++++++++--
 kernel/time/timer.c                                        |   13 
 tools/testing/selftests/rcutorture/configs/rcu/TREE01.boot |    4 
 14 files changed, 714 insertions(+), 99 deletions(-)