All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Andrii Nakryiko <andrii@kernel.org>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <martin.lau@kernel.org>,
	Kernel Team <kernel-team@meta.com>
Subject: Re: [PATCH bpf-next 5/6] bpf: add bpf_test_tp() kfunc triggering tp and allowing error injection
Date: Tue, 26 Mar 2024 11:57:55 +0100	[thread overview]
Message-ID: <ZgKqMwmrjkr-ByYE@krava> (raw)
In-Reply-To: <CAEf4Bzbu_4OZwgXREAbxY4fjwG2zFhox8nXpRgd_p6aUENCufg@mail.gmail.com>

On Mon, Mar 25, 2024 at 06:43:29PM -0700, Andrii Nakryiko wrote:

SNIP

> > I'll add bpf_modify_return_test_tp() to not touch all the tests using
> > bpf_modify_return_test() and bpf_modify_return_test2(), if that's ok.
> > Existing ones expect some memory pointer, dereference it, etc, it
> > seems cleaner to have a dedicated tp-triggering one for this.
> >
> > > Exercise of test tracepoint can be there as well.
> > > Asking bpf prog to call a kfunc to call a tracepoint
> > > looks like extra hop.
> > > Existing test_run facility should be able to accommodate.
> >
> > You mean if I add bpf_modify_return_test_tp() above, I should pass an
> > argument of how many times that tracepoint should be triggered? Or you
> > mean to use test_run's repeat argument to trigger "driver program" N
> > times, and the driver program would just call
> > bpf_modify_return_test_tp() once? If the latter, I'm not sure it's the
> > same as calling the driver program once and doing a loop inside, as
> > we'll measure more of calling driver program overhead (N times vs 1
> > time right now, per each N tp/fmod_ret calls).
> >
> > (But tbh, not having to use test_run's repeat functionality is a
> > benefit, IMO, we can have more flexible counting/timing code and
> > whatever else we might need, I'm not sure why using test_run's repeat
> > is advantageous here)
> >
> > Not sure what you are trying to optimize for here, please clarify.
> >
> 
> So I currently have these changes. I moved tp into bpf_test_run.h
> (didn't know we have that, this should eliminate the issue that Jiri
> saw as well). Moved kfunc into net/bpf/test_run.c and renamed it to

sorry I did not get to it yet.. will test the new version

jirka

  parent reply	other threads:[~2024-03-26 10:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22  0:00 [PATCH bpf-next 0/6] bench: fast in-kernel triggering benchmarks Andrii Nakryiko
2024-03-22  0:00 ` [PATCH bpf-next 1/6] selftests/bpf: rename and clean up userspace-triggered benchmarks Andrii Nakryiko
2024-03-22  0:00 ` [PATCH bpf-next 2/6] selftests/bpf: add batched, mostly in-kernel BPF triggering benchmarks Andrii Nakryiko
2024-03-25 17:21   ` Alexei Starovoitov
2024-03-25 23:21     ` Andrii Nakryiko
2024-03-22  0:00 ` [PATCH bpf-next 3/6] selftests/bpf: remove syscall-driven benchs, keep syscall-count only Andrii Nakryiko
2024-03-22  0:00 ` [PATCH bpf-next 4/6] selftests/bpf: lazy-load trigger bench BPF programs Andrii Nakryiko
2024-03-22  0:00 ` [PATCH bpf-next 5/6] bpf: add bpf_test_tp() kfunc triggering tp and allowing error injection Andrii Nakryiko
2024-03-22 13:12   ` Jiri Olsa
2024-03-22 16:52     ` Andrii Nakryiko
2024-03-25 17:36   ` Alexei Starovoitov
2024-03-25 22:19     ` Andrii Nakryiko
2024-03-26  1:43       ` Andrii Nakryiko
2024-03-26  2:32         ` Alexei Starovoitov
2024-03-26 10:57         ` Jiri Olsa [this message]
2024-03-22  0:00 ` [PATCH bpf-next 6/6] selftests/bpf: add batched tp/raw_tp/fmodret tests Andrii Nakryiko

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=ZgKqMwmrjkr-ByYE@krava \
    --to=olsajiri@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@meta.com \
    --cc=martin.lau@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.