diff options
author | Alexei Starovoitov <ast@kernel.org> | 2024-03-27 23:01:00 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-03-29 02:31:40 +0100 |
commit | a461a51e519aedee8aff518167451b250ce913b3 (patch) | |
tree | 9930d2880ee3a9d0acc2575b52f6a868992b99e6 /kernel/bpf | |
parent | bpf,arena: Use helper sizeof_field in struct accessors (diff) | |
parent | selftests/bpf: add batched tp/raw_tp/fmodret tests (diff) | |
download | linux-a461a51e519aedee8aff518167451b250ce913b3.tar.xz linux-a461a51e519aedee8aff518167451b250ce913b3.zip |
Merge branch 'bench-fast-in-kernel-triggering-benchmarks'
Andrii Nakryiko says:
====================
bench: fast in-kernel triggering benchmarks
Remove "legacy" triggering benchmarks which rely on syscalls (and thus syscall
overhead is a noticeable part of benchmark, unfortunately). Replace them with
faster versions that rely on triggering BPF programs in-kernel through another
simple "driver" BPF program. See patch #2 with comparison results.
raw_tp/tp/fmodret benchmarks required adding a simple kfunc in kernel to be
able to trigger a simple tracepoint from BPF program (plus it is also allowed
to be replaced by fmod_ret programs). This limits raw_tp/tp/fmodret benchmarks
to new kernels only, but it keeps bench tool itself very portable and most of
other benchmarks will still work on wide variety of kernels without the need
to worry about building and deploying custom kernel module. See patches #5
and #6 for details.
v1->v2:
- move new TP closer to BPF test run code;
- rename/move kfunc and register it for fmod_rets (Alexei);
- limit --trig-batch-iters param to [1, 1000] (Alexei).
====================
Link: https://lore.kernel.org/r/20240326162151.3981687-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf')
-rw-r--r-- | kernel/bpf/helpers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c index f860adab3eb9..d9e7aca8ae9e 100644 --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -2625,6 +2625,7 @@ BTF_ID_FLAGS(func, bpf_dynptr_is_null) BTF_ID_FLAGS(func, bpf_dynptr_is_rdonly) BTF_ID_FLAGS(func, bpf_dynptr_size) BTF_ID_FLAGS(func, bpf_dynptr_clone) +BTF_ID_FLAGS(func, bpf_modify_return_test_tp) BTF_KFUNCS_END(common_btf_ids) static const struct btf_kfunc_id_set common_kfunc_set = { |