From: Steven Rostedt <rostedt@goodmis.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: linux-kernel@vger.kernel.org,
Michael Jeanson <mjeanson@efficios.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Alexei Starovoitov <ast@kernel.org>, Yonghong Song <yhs@fb.com>,
"Paul E . McKenney" <paulmck@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>,
bpf@vger.kernel.org, Joel Fernandes <joel@joelfernandes.org>,
Jordan Rife <jrife@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [RFC PATCH v3 2/3] tracing: Introduce tracepoint_is_syscall()
Date: Mon, 28 Oct 2024 01:06:47 -0400 [thread overview]
Message-ID: <20241028010647.38f4847f@rorschach.local.home> (raw)
In-Reply-To: <933ab148-2a28-4912-9bca-150a0643eecd@efficios.com>
On Sun, 27 Oct 2024 08:30:54 -0400
Mathieu Desnoyers <mathieu.desnoyers@efficios.com> wrote:
> >
> > I wonder if we should call it "sleepable" instead? For this patch set
> > do we really care if it's a system call or not? It's really if the
> > tracepoint is sleepable or not that's the issue. System calls are just
> > one user of it, there may be more in the future, and the changes to BPF
> > will still be needed.
>
> Remember that syscall tracepoint probes are allowed to handle page
> faults, but should not generally block, otherwise it would postpone the
> grace periods of all RCU tasks trace users.
>
> So naming this "sleepable" would be misleading, because probes are
> not allowed general blocking, just to handle page faults.
I'm fine with "faultable" too.
>
> If we look at the history of this tracepoint feature, we went with
> the following naming over the various versions of the patch series:
>
> 1) Sleepable tracepoints: until we understood that we just want to
> allow page fault, not general sleeping, so we needed to change
> the name,
>
> 2) Faultable tracepoints: until Linus requested that we aim for
> something that is specific to system calls, rather than a generic
> thing.
>
> https://lore.kernel.org/lkml/CAHk-=wggDLDeTKbhb5hh--x=-DQd69v41137M72m6NOTmbD-cw@mail.gmail.com/
Reading that thread again, I believe that Linus was talking more about
all the infrastructure going around to make a special "faultable"
tracepoint (I could be wrong, and Linus may correct me here). When in
fact, the only user is system calls. But from the BPF POV, it doesn't
care if it's a system call, it cares that it is faultable, and the
check should be on that. Having BPF check if it's a system call is
requiring that BPF knows the implementation details of system call
tracepoints. But if it knows it is faultable, then it needs to do
something special.
>
> 3) Syscall tracepoints: This is what we currently have.
>
> > Other than that, I think this could work.
>
> Calling this field "sleepable" would be misleading. Calling it "faultable"
> would be a better fit, but based on Linus' request, I'm tempted to stick
> with "syscall" for now.
>
> Your concern is to name this in a way that is general and future-proof.
> Linus' point was to make it syscall-specific rather than general. My
> position is that we should wait until we face other use-cases (if we
> even do) before consider changing the naming from "syscall" to something
> more generic.
Yes, but that was for the infrastructure itself. It really doesnt' make
sense that BPF needs to know which type of tracepoint can fault. That's
telling BPF, you need to know the implementation of this type of
tracepoint.
-- Steve
next prev parent reply other threads:[~2024-10-28 5:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 15:46 [RFC PATCH v3 1/3] tracing: Introduce tracepoint extended structure Mathieu Desnoyers
2024-10-26 15:46 ` [RFC PATCH v3 2/3] tracing: Introduce tracepoint_is_syscall() Mathieu Desnoyers
2024-10-27 0:08 ` Steven Rostedt
2024-10-27 12:30 ` Mathieu Desnoyers
2024-10-28 5:06 ` Steven Rostedt [this message]
2024-10-28 13:35 ` Mathieu Desnoyers
2024-10-27 14:19 ` Masami Hiramatsu
2024-10-28 1:23 ` Andrii Nakryiko
2024-10-28 13:36 ` Mathieu Desnoyers
2024-10-26 15:46 ` [RFC PATCH v3 3/3] tracing: Fix syscall tracepoint use-after-free Mathieu Desnoyers
2024-10-28 1:22 ` Andrii Nakryiko
2024-10-28 19:19 ` Mathieu Desnoyers
2024-10-31 15:43 ` Mathieu Desnoyers
2024-10-31 16:35 ` Andrii Nakryiko
2024-10-28 1:22 ` [RFC PATCH v3 1/3] tracing: Introduce tracepoint extended structure Andrii Nakryiko
2024-10-28 19:13 ` Mathieu Desnoyers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241028010647.38f4847f@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=joel@joelfernandes.org \
--cc=jrife@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=mjeanson@efficios.com \
--cc=namhyung@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox