RFC ftrace/rcu: Handle unsafe RCU functions and ftrace callbacks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest18 patches 55 repliesIn review
- v1 RFC8 patches 1 replySuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | ftrace: Add hash list to save RCU unsafe functionsinclude/ include/ kernel/ | +174 | 15 replies | |
| 2/18 | ftrace: Do not set ftrace records for unsafe RCU when not allowedkernel/ | +17 | 1 reply | |
| 3/18 | ftrace: Set ftrace internal function tracing RCU safekernel/ | +3 | 4 replies | |
| 4/18 | ftrace: Add test for ops against unsafe RCU functions in callbackkernel/ | +3 | 1 reply | |
| 5/18 | ftrace: Do not display non safe RCU functions in available_filter_functionsinclude/ kernel/ | +6 | 5 replies | |
| 6/18 | ftrace: Add rcu_unsafe_filter_functions fileinclude/ kernel/ | +32 | 1 reply | |
| 7/18 | ftrace: Add selftest to check if RCU unsafe functions are filtered properlykernel/ kernel/ kernel/ | +103 | 1 reply | |
| 8/18 | ftrace/rcu: Do not trace debug_lockdep_rcu_enabled()kernel/ | +1 | 2 replies | |
| 9/18 | ftrace: Fix a slight race in modifying what function callback gets tracedkernel/ | +16 | 0 replies | |
| 10/18 | ftrace: Create a RCU unsafe checkerkernel/ kernel/ kernel/ +1 more | +83 | 1 reply | |
| 11/18 | ftrace: Adde infrastructure to stop RCU unsafe checker from checkingkernel/ kernel/ | +24 | 4 replies | |
| 12/18 | ftrace: Disable RCU unsafe checker when function graph is enabledkernel/ | +7 | 3 replies | |
| 13/18 | ftrace: Disable the RCU unsafe checker when irqsoff is enabledkernel/ | +14 | 1 reply | |
| 14/18 | ftrace/lockdep: Have the RCU lockdep splat show what function triggeredinclude/ kernel/ kernel/ | +22 | 7 replies | |
| 15/18 | ftrace/rcu: Mark functions that are RCU unsafekernel/ kernel/ | +8 | 3 replies | |
| 16/18 | rcu/irq/x86: Mark functions that are RCU unsafearch/ arch/ arch/ +2 more | +16 | 1 reply | |
| 17/18 | ftrace/cpuidle/x86: Mark functions that are RCU unsafearch/ drivers/ kernel/ | +6 | 3 replies | |
| 18/18 | ftrace/sched: Mark functions that are RCU unsafekernel/ | +2 | 1 reply |
Reviews trailers per patch
15 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Rafael J. Wysocki | Paul E. McKenney | H. Peter Anvin |
|---|---|---|---|
| 1/18 | A-b R-b | ||
| 2/18 | A-b | ||
| 3/18 | A-b A-b | ||
| 4/18 | A-b | ||
| 5/18 | A-b | ||
| 6/18 | A-b | ||
| 7/18 | A-b | ||
| 8/18 | R-b | ||
| 9/18 | |||
| 10/18 | A-b | ||
| 11/18 | A-b | ||
| 12/18 | |||
| 13/18 | |||
| 14/18 | A-b | ||
| 15/18 | R-b | ||
| 16/18 | A-b | ||
| 17/18 | A-b | A-b | A-b |
| 18/18 | A-b |
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.
Cover letter [RFC][PATCH 00/18 v2] ftrace/rcu: Handle unsafe RCU functions and ftrace callbacks
This is my final draft of the patches. I'm starting to run them through my formal tests now. They may change depending on the outcome of the tests.
I'm also a bit tired, and I added the change logs last. Thus I may need to go back and fix the change logs up too. But the code was done when I was rather spunky. But that doesn't mean I didn't break anything.
Anyway, let me know what you think. I'm going to need acks for the places I added the FTRACE_UNSAFE_RCU() annotations.
I added a checker that traces all functions with the non RCU safe settings, and did a rcu_read_lock() with PROVE_RCU enabled. This caught several functions that needed to be annotated. There may be more, but the test gives us a way to find out.
There's some improvements that can be done to these patches, but for 3.12, I think this version is good enough. We can do the improvements for 3.13.
Well, enjoy.
-- Steve
Steven Rostedt (Red Hat) (18):
ftrace: Add hash list to save RCU unsafe functions
ftrace: Do not set ftrace records for unsafe RCU when not allowed
ftrace: Set ftrace internal function tracing RCU safe
ftrace: Add test for ops against unsafe RCU functions in callback
ftrace: Do not display non safe RCU functions in available_filter_functions
ftrace: Add rcu_unsafe_filter_functions file
ftrace: Add selftest to check if RCU unsafe functions are filtered properly ftrace/rcu: Do not trace debug_lockdep_rcu_enabled()
ftrace: Fix a slight race in modifying what function callback gets traced
ftrace: Create a RCU unsafe checker
ftrace: Adde infrastructure to stop RCU unsafe checker from checking
ftrace: Disable RCU unsafe checker when function graph is enabled
ftrace: Disable the RCU unsafe checker when irqsoff is enabled ftrace/lockdep: Have the RCU lockdep splat show what function triggered ftrace/rcu: Mark functions that are RCU unsafe
rcu/irq/x86: Mark functions that are RCU unsafe ftrace/cpuidle/x86: Mark functions that are RCU unsafe ftrace/sched: Mark functions that are RCU unsafe
----
arch/x86/kernel/apic/apic.c | 2 + arch/x86/kernel/irq.c | 1 + arch/x86/kernel/irq_work.c | 3 + arch/x86/kernel/process.c | 2 + arch/x86/kernel/smp.c | 8 ++ drivers/cpuidle/cpuidle.c | 2 + include/asm-generic/vmlinux.lds.h | 10 ++ include/linux/ftrace.h | 46 +++++++ kernel/cpu/idle.c | 2 + kernel/lockdep.c | 2 + kernel/rcupdate.c | 2 +- kernel/rcutiny.c | 1 + kernel/rcutree.c | 7 + kernel/sched/core.c | 2 + kernel/softirq.c | 2 + kernel/trace/Kconfig | 22 ++++ kernel/trace/ftrace.c | 231 +++++++++++++++++++++++++++++++-- kernel/trace/trace.h | 11 ++ kernel/trace/trace_functions.c | 76 ++++++++++- kernel/trace/trace_irqsoff.c | 16 ++- kernel/trace/trace_selftest.c | 94 ++++++++++++++ kernel/trace/trace_selftest_dynamic.c | 7 + 22 files changed, 532 insertions(+), 17 deletions(-)