rcu/context-tracking: Merge RCU eqs-dynticks counter to context tracking v2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest21 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | context_tracking: Remove unused context_tracking_in_user()include/ | +0 | 0 replies | |
| 2/21 | rcu: Set rcu_idle_enter() as noinstrkernel/ | +1 | 0 replies | |
| 3/21 | rcu: Add a note about noinstr VS unsafe eqs functionskernel/ | +12 | 9 replies | |
| 4/21 | context_tracking: Add a note about noinstr VS unsafe context tracking functionskernel/ | +18 | 0 replies | |
| 5/21 | context_tracking: Rename __context_tracking_enter/exit() to __ct_user_enter/exit()include/ kernel/ | +16 | 0 replies | |
| 6/21 | context_tracking: Rename context_tracking_user_enter/exit() to user_enter/exit_callable()arch/ arch/ arch/ +2 more | +25 | 0 replies | |
| 7/21 | context_tracking: Rename context_tracking_enter/exit() to ct_user_enter/exit()include/ kernel/ | +13 | 0 replies | |
| 8/21 | context_tracking: Rename context_tracking_cpu_set() to ct_cpu_track_user()include/ kernel/ kernel/ | +4 | 0 replies | |
| 9/21 | context_tracking: Split user tracking KconfigDocumentation/ arch/ arch/ +19 more | +54 | 0 replies | |
| 10/21 | context_tracking: Take idle eqs entrypoints over RCUDocumentation/ arch/ drivers/ +10 more | +44 | 3 replies | |
| 11/21 | context_tracking: Take IRQ eqs entrypoints over RCUDocumentation/ Documentation/ arch/ +14 more | +85 | 0 replies | |
| 12/21 | context_tracking: Take NMI eqs entrypoints over RCUDocumentation/ arch/ arch/ +6 more | +27 | 0 replies | |
| 13/21 | rcu/context-tracking: Remove rcu_irq_enter/exit()include/ include/ kernel/ +1 more | +75 | 0 replies | |
| 14/21 | rcu/context_tracking: Move dynticks counter to context trackinginclude/ kernel/ kernel/ +3 more | +61 | 0 replies | |
| 15/21 | rcu/context_tracking: Move dynticks_nesting to context trackinginclude/ kernel/ kernel/ +2 more | +30 | 0 replies | |
| 16/21 | rcu/context_tracking: Move dynticks_nmi_nesting to context trackinginclude/ kernel/ kernel/ +3 more | +38 | 0 replies | |
| 17/21 | rcu/context-tracking: Move deferred nocb resched to context trackinginclude/ kernel/ kernel/ | +16 | 0 replies | |
| 18/21 | rcu/context-tracking: Move RCU-dynticks internal functions to context_trackinginclude/ include/ kernel/ +3 more | +370 | 0 replies | |
| 19/21 | rcu/context-tracking: Remove unused and/or unecessary middle functionsDocumentation/ include/ include/ +3 more | +50 | 0 replies | |
| 20/21 | context_tracking: Convert state to atomic_tinclude/ include/ kernel/ | +46 | 3 replies | |
| 21/21 | rcu/context_tracking: Merge dynticks counter and context tracking statesinclude/ include/ kernel/ +2 more | +74 | 2 replies |
Reviews trailers per patch
7 of 21 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Paul E. McKenney | Nicolas Saenz Julienne |
|---|---|---|
| Series | R-b T-b | |
| 1/21 | ||
| 2/21 | ||
| 3/21 | ||
| 4/21 | ||
| 5/21 | A-b | |
| 6/21 | ||
| 7/21 | ||
| 8/21 | ||
| 9/21 | ||
| 10/21 | ||
| 11/21 | A-b | |
| 12/21 | A-b | |
| 13/21 | ||
| 14/21 | A-b | |
| 15/21 | A-b | |
| 16/21 | ||
| 17/21 | A-b | |
| 18/21 | A-b | |
| 19/21 | ||
| 20/21 | ||
| 21/21 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/21] rcu/context-tracking: Merge RCU eqs-dynticks counter to context tracking v2
This mixes up the RCU dynticks counter and the context tracking state updates into a single atomic instruction. This may serve several purposes:
1) Improve CPU isolation with deferring some disturbances until sensitive userspace workload completes and goes to the kernel. This can take several forms, for example smp_call_function_housekeeping() or on_each_housekeeping_cpu() to enqueue and execute work on all housekeeping CPUs. Then an atomic operation on ct->state can defer the work on nohz_full CPUs until they run in kernel (or IPI them if they are in kernel mode), see this proposal by Peter:
https://lore.kernel.org/all/[email protected]/#r
2) Unearth sysidle (https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=sysidle.2017.05.11a&id=fe5ac724d81a3c7803e60c2232718f212f3f38d4)
This feature allowed to shutdown the tick on the last housekeeping
CPU once the rest of the system is fully idle. We needed some proper
fully ordered context tracking for that.
Inspired by Peterz: https://lore.kernel.org/all/[email protected]
Passed 100 hours of TREE01.
---
Changes since v1 after Paul, Nicolas and Peter's reviews:
* Rebased against latest rcu:dev
* Remove context_tracking_in_user()
* Tag rcu_idle_enter() as noinstr
* Add comments to explain why some RCU and context tracking functions can not be tagged as noinstr yet even though they should
* Add Acks from Paul
* Rename context_tracking_cpu_set() to ct_cpu_track_user()
* Some changelogs fixed
* Fix missing renames in cpuidle
* Add missing header comments for ct_irq_*()
* Add accessors for ->dynticks_nesting and ->dynticks_nmi_nesting
* Fix ->dynticks_nesting[_nmi] that were printed from the local ct instead of the remote one
* Only build rcu_irq_exit_check_preempt() when CONFIG_NO_HZ_FULL=y
* Remove static from rcu_preempt_deferred_qs() for all configs
* CONTEXT_* values now count from 0 to 4 instead of using bit flags, since all these states are mutually exclusive anyway. Therefore RCU_DYNTICKS_IDX now starts at 4 instead of 8.
* Keep the lowest bits of rcu_dynticks_snap() and expand a bit the printing size accordingly.
---git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
rcu/context-tracking-v2
HEAD: 0364ddb8830db4d4b78f7bfd9344e12d22e9cd32
Thanks,
Frederic
---
Frederic Weisbecker (21):
context_tracking: Remove unused context_tracking_in_user()
rcu: Set rcu_idle_enter() as noinstr
rcu: Add a note about noinstr VS unsafe eqs functions
context_tracking: Add a note about noinstr VS unsafe context tracking functions
context_tracking: Rename __context_tracking_enter/exit() to __ct_user_enter/exit()
context_tracking: Rename context_tracking_user_enter/exit() to user_enter/exit_callable()
context_tracking: Rename context_tracking_enter/exit() to ct_user_enter/exit()
context_tracking: Rename context_tracking_cpu_set() to ct_cpu_track_user()
context_tracking: Split user tracking Kconfig
context_tracking: Take idle eqs entrypoints over RCU
context_tracking: Take IRQ eqs entrypoints over RCU
context_tracking: Take NMI eqs entrypoints over RCU
rcu/context-tracking: Remove rcu_irq_enter/exit()
rcu/context_tracking: Move dynticks counter to context tracking rcu/context_tracking: Move dynticks_nesting to context tracking rcu/context_tracking: Move dynticks_nmi_nesting to context tracking rcu/context-tracking: Move deferred nocb resched to context tracking rcu/context-tracking: Move RCU-dynticks internal functions to context_tracking rcu/context-tracking: Remove unused and/or unecessary middle functions
context_tracking: Convert state to atomic_t
rcu/context_tracking: Merge dynticks counter and context tracking states
.../RCU/Design/Requirements/Requirements.rst | 10 +- Documentation/RCU/stallwarn.rst | 6 +- .../time/context-tracking/arch-support.txt | 6 +- arch/Kconfig | 8 +- arch/arm/Kconfig | 2 +- arch/arm/kernel/entry-common.S | 4 +- arch/arm/kernel/entry-header.S | 12 +- arch/arm/mach-imx/cpuidle-imx6q.c | 5 +- arch/arm64/Kconfig | 2 +- arch/arm64/kernel/entry-common.c | 14 +- arch/csky/Kconfig | 2 +- arch/csky/kernel/entry.S | 8 +- arch/mips/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/context_tracking.h | 2 +- arch/riscv/Kconfig | 2 +- arch/riscv/kernel/entry.S | 12 +- arch/sparc/Kconfig | 2 +- arch/sparc/kernel/rtrap_64.S | 2 +- arch/x86/Kconfig | 4 +- arch/x86/mm/fault.c | 2 +- drivers/acpi/processor_idle.c | 5 +- drivers/cpuidle/cpuidle-psci.c | 8 +- drivers/cpuidle/cpuidle-riscv-sbi.c | 8 +- drivers/cpuidle/cpuidle.c | 9 +- include/linux/context_tracking.h | 89 ++-- include/linux/context_tracking_irq.h | 21 + include/linux/context_tracking_state.h | 103 +++- include/linux/entry-common.h | 10 +- include/linux/hardirq.h | 12 +- include/linux/rcupdate.h | 15 +- include/linux/rcutiny.h | 6 - include/linux/rcutree.h | 15 +- include/linux/tracepoint.h | 4 +- init/Kconfig | 4 +- kernel/context_tracking.c | 556 +++++++++++++++++++-- kernel/cpu_pm.c | 8 +- kernel/entry/common.c | 16 +- kernel/extable.c | 4 +- kernel/locking/lockdep.c | 2 +- kernel/rcu/Kconfig | 2 + kernel/rcu/rcu.h | 4 - kernel/rcu/tree.c | 476 +----------------- kernel/rcu/tree.h | 8 - kernel/rcu/tree_exp.h | 2 +- kernel/rcu/tree_plugin.h | 38 +- kernel/rcu/tree_stall.h | 8 +- kernel/rcu/update.c | 2 +- kernel/sched/core.c | 2 +- kernel/sched/idle.c | 10 +- kernel/sched/sched.h | 1 + kernel/softirq.c | 4 +- kernel/time/Kconfig | 22 +- kernel/time/tick-sched.c | 2 +- kernel/trace/trace.c | 8 +- 55 files changed, 845 insertions(+), 748 deletions(-)