From: Eduard Zingerman <eddyz87@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Ian Rogers <irogers@google.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
bpf <bpf@vger.kernel.org>,
"linux-perf-use." <linux-perf-users@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Thomas Richter <tmricht@linux.ibm.com>,
Jiri Olsa <jolsa@kernel.org>, Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH v3 1/2] libbpf: Add the ability to suppress perf event enablement
Date: Tue, 05 Aug 2025 10:14:23 -0700 [thread overview]
Message-ID: <d71dc18f397becb9e7120a0f3253828d045e1ae0.camel@gmail.com> (raw)
In-Reply-To: <CAADnVQ+6WuHrrAg1bQ+-6p1zZAWQVC_EGtt9ocv5aZE9=CxB5g@mail.gmail.com>
On Tue, 2025-08-05 at 09:45 -0700, Alexei Starovoitov wrote:
> On Tue, Aug 5, 2025 at 6:04 AM Ilya Leoshkevich <iii@linux.ibm.com> wrote:
> >
> > Automatically enabling a perf event after attaching a BPF prog to it is
> > not always desirable.
> >
> > Add a new no_ioctl_enable field to struct bpf_perf_event_opts. While
> > introducing ioctl_enable instead would be nicer in that it would avoid
> > a double negation in the implementation, it would make
> > DECLARE_LIBBPF_OPTS() less efficient.
> >
> > Suggested-by: Jiri Olsa <jolsa@kernel.org>
> > Co-developed-by: Thomas Richter <tmricht@linux.ibm.com>
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> > ---
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
[...]
> > --- a/tools/lib/bpf/libbpf.h
> > +++ b/tools/lib/bpf/libbpf.h
> > @@ -499,9 +499,11 @@ struct bpf_perf_event_opts {
> > __u64 bpf_cookie;
> > /* don't use BPF link when attach BPF program */
> > bool force_ioctl_attach;
> > + /* don't automatically enable the event */
> > + bool no_ioctl_enable;
>
> The patch logic looks fine, but I feel the knob name is too
> implementation oriented.
> imo "dont_auto_enable" is more descriptive and easier
> to reason about.
>
> Let's wait for Eduard/Andrii reviews. This patch has to go
> via bpf trees first while the latter via perf.
Agree with Alexei,
something like "dont_enable" should be simpler to read.
next prev parent reply other threads:[~2025-08-05 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 12:54 [PATCH v3 0/2] perf/s390: Regression: Move uid filtering to BPF filters Ilya Leoshkevich
2025-08-05 12:54 ` [PATCH v3 1/2] libbpf: Add the ability to suppress perf event enablement Ilya Leoshkevich
2025-08-05 16:45 ` Alexei Starovoitov
2025-08-05 17:14 ` Eduard Zingerman [this message]
2025-08-05 12:54 ` [PATCH v3 2/2] perf bpf-filter: Enable events manually Ilya Leoshkevich
2025-08-05 14:14 ` Alexander Gordeev
2025-08-06 9:29 ` Thomas Richter
2025-08-06 11:29 ` Ilya Leoshkevich
2025-08-05 13:33 ` [PATCH v3 0/2] perf/s390: Regression: Move uid filtering to BPF filters Thomas Richter
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=d71dc18f397becb9e7120a0f3253828d045e1ae0.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=acme@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=tmricht@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).