Skip to content

RFC Sleepable tracepoints

Michael Jeanson bpf lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tracing: introduce sleepable tracepointsinclude/linux/tracepoint-defs.h include/linux/tracepoint.h include/trace/define_trace.h +3 more+181 -325 replies
2/6tracing: ftrace: add support for sleepable tracepointsinclude/trace/trace_events.h kernel/trace/trace_events.c+83 -70 replies
3/6tracing: bpf-trace: add support for sleepable tracepointsinclude/trace/bpf_probe.h kernel/trace/bpf_trace.c+25 -30 replies
4/6tracing: perf: add support for sleepable tracepointsinclude/trace/perf.h+22 -40 replies
5/6tracing: convert sys_enter/exit to sleepable tracepointsinclude/trace/events/syscalls.h kernel/trace/trace_syscalls.c+44 -280 replies
6/6tracing: use sched-RCU instead of SRCU for rcuidle tracepointsinclude/linux/tracepoint.h kernel/tracepoint.c+16 -426 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/6] 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 base on v5.9.1.

Cc Steven Rostedt (VMware) <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Alexei Starovoitov <[email protected]>
Cc Yonghong Song <[email protected]>
Cc Paul E. McKenney <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Joel Fernandes (Google) <[email protected]>

Mathieu Desnoyers (1):
tracing: use sched-RCU instead of SRCU for rcuidle tracepoints

Michael Jeanson (5):
tracing: introduce sleepable tracepoints
tracing: ftrace: add support for sleepable tracepoints
tracing: bpf-trace: add support for sleepable tracepoints
tracing: perf: add support for sleepable tracepoints
tracing: convert sys_enter/exit to sleepable tracepoints

 include/linux/tracepoint-defs.h |  11 ++++
 include/linux/tracepoint.h      | 104 +++++++++++++++++++++-----------
 include/trace/bpf_probe.h       |  23 ++++++-
 include/trace/define_trace.h    |   7 +++
 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   |  68 +++++++++++++--------
 kernel/tracepoint.c             | 104 +++++++++++++++++++++++++-------
 12 files changed, 351 insertions(+), 96 deletions(-)
Signature · 1 line
2.25.1