RFC Faultable tracepoints (v2)
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest6 patches 7 repliesIn review
Changes since v1 RFC from the cover letter
- Rename "sleepable tracepoints" to "faultable tracepoints", MAYSLEEP to MAYFAULT, and use might_fault() rather than might_sleep(), to properly convey that the tracepoints are meant to be able to take a page fault, which requires to be able to sleep *and* to hold the mmap_sem.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | tracing: introduce faultable tracepoints (v2)include/ include/ include/ +3 more | +186 | 0 replies | |
| 2/6 | tracing: ftrace: add support for faultable tracepointsinclude/ kernel/ | +83 | 0 replies | |
| 3/6 | tracing: bpf-trace: add support for faultable tracepointsinclude/ kernel/ | +25 | 0 replies | |
| 4/6 | tracing: perf: add support for faultable tracepointsinclude/ | +22 | 0 replies | |
| 5/6 | tracing: convert sys_enter/exit to faultable tracepointsinclude/ kernel/ | +60 | 0 replies | |
| 6/6 | tracing: use Tasks Trace RCU instead of SRCU for rcuidle tracepointsinclude/ kernel/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/6] [RFC] Faultable tracepoints (v2)
Formerly known as “Sleepable tracepoints”.
When invoked from system call enter/exit instrumentation, accessing user-space data is a common use-case for tracers. However, tracepoints currently disable preemption around iteration on the registered tracepoint probes and invocation of the probe callbacks, which prevents tracers from handling page faults.
Extend the tracepoint and trace event APIs to allow specific tracer probes to take page faults. Adapt ftrace, perf, and ebpf to allow being called from sleepable context, and convert the system call enter/exit instrumentation to sleepable tracepoints.
This series only implements the tracepoint infrastructure required to allow tracers to handle page faults. Modifying each tracer to handle those page faults would be a next step after we all agree on this piece of instrumentation infrastructure.
This patchset is based on v5.10.15.
Changes since v1 RFC:
- Rename "sleepable tracepoints" to "faultable tracepoints", MAYSLEEP to MAYFAULT, and use might_fault() rather than might_sleep(), to properly convey that the tracepoints are meant to be able to take a page fault, which requires to be able to sleep *and* to hold the mmap_sem.
Mathieu Desnoyers (1):
tracing: use Tasks Trace RCU instead of SRCU for rcuidle tracepoints
Michael Jeanson (5):
tracing: introduce faultable tracepoints (v2)
tracing: ftrace: add support for faultable tracepoints
tracing: bpf-trace: add support for faultable tracepoints
tracing: perf: add support for faultable tracepoints
tracing: convert sys_enter/exit to faultable tracepoints
include/linux/tracepoint-defs.h | 11 ++++ include/linux/tracepoint.h | 111 +++++++++++++++++++++----------- include/trace/bpf_probe.h | 23 ++++++- include/trace/define_trace.h | 8 +++ include/trace/events/syscalls.h | 4 +- include/trace/perf.h | 26 ++++++-- include/trace/trace_events.h | 79 +++++++++++++++++++++-- init/Kconfig | 1 + kernel/trace/bpf_trace.c | 5 +- kernel/trace/trace_events.c | 15 ++++- kernel/trace/trace_syscalls.c | 84 ++++++++++++++++-------- kernel/tracepoint.c | 104 ++++++++++++++++++++++++------ 12 files changed, 373 insertions(+), 98 deletions(-)
Signature · 1 line
2.25.1