[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <459b9e7d-be9b-41d8-8ae3-4aa707def641@efficios.com>
Date: Mon, 28 Oct 2024 09:36:43 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To: Andrii Nakryiko <andrii.nakryiko@...il.com>,
Masami Hiramatsu <mhiramat@...nel.org>
Cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Michael Jeanson <mjeanson@...icios.com>,
Peter Zijlstra <peterz@...radead.org>, Alexei Starovoitov <ast@...nel.org>,
Yonghong Song <yhs@...com>, "Paul E . McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Namhyung Kim <namhyung@...nel.org>, bpf@...r.kernel.org,
Joel Fernandes <joel@...lfernandes.org>, Jordan Rife <jrife@...gle.com>
Subject: Re: [RFC PATCH v3 2/3] tracing: Introduce tracepoint_is_syscall()
On 2024-10-27 21:23, Andrii Nakryiko wrote:
> On Sun, Oct 27, 2024 at 7:19 AM Masami Hiramatsu <mhiramat@...nel.org> wrote:
[...]
>>>> include/linux/tracepoint-defs.h | 2 ++
>>>> include/linux/tracepoint.h | 24 ++++++++++++++++++++++++
>>>> include/trace/define_trace.h | 2 +-
>>>> 3 files changed, 27 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/include/linux/tracepoint-defs.h b/include/linux/tracepoint-defs.h
>>>> index 967c08d9da84..53119e074c87 100644
>>>> --- a/include/linux/tracepoint-defs.h
>>>> +++ b/include/linux/tracepoint-defs.h
>>>> @@ -32,6 +32,8 @@ struct tracepoint_func {
>>>> struct tracepoint_ext {
>>>> int (*regfunc)(void);
>>>> void (*unregfunc)(void);
>>>> + /* Flags. */
>>>> + unsigned int syscall:1;
>>>
>>> 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.
>>
>> I agree with this. Even if currently we restrict only syscall events
>> can be sleep, "tracepoint_is_syscall()" requires to add comment to
>> explain why on all call sites e.g.
>>
>
> +1 to naming this "sleepable" (or at least "faultable"). BPF world
> uses "sleepable BPF" terminology for BPF programs and attachment hooks
> that can take page fault (and wait/sleep waiting for those to be
> handled), so this would be consistent with that. Also, from BPF
> standpoint this will be advertised as attaching to sleepable
> tracepoints regardless, so "syscall" terminology is too specific and
> misleading, because while current set of tracepoints are
> syscall-specific, the important part is taking page fault, no tracing
> syscalls.
+1 for "faultable".
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
Powered by blists - more mailing lists