Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/bpf: Add perfbuf multi-producer benchmark

Add a multi-producer benchmark for perfbuf to complement the existing
ringbuf multi-producer test. Unlike ringbuf which uses a shared buffer
and experiences contention, perfbuf uses per-CPU buffers so the test
measures scaling behavior rather than contention.

This allows developers to compare perfbuf vs ringbuf performance under
multi-producer workloads when choosing between the two for their systems.

Signed-off-by: Gyutae Bae <gyutae.bae@navercorp.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20260120090716.82927-1-gyutae.opensource@navercorp.com

authored by

Gyutae Bae and committed by
Andrii Nakryiko
2e6690d4 f81c07a6

+5
+5
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh
··· 49 49 summarize "rb-libbpf nr_prod $b" "$($RUN_RB_BENCH -p$b --rb-batch-cnt 50 rb-libbpf)" 50 50 done 51 51 52 + header "Perfbuf, multi-producer" 53 + for b in 1 2 3 4 8 12 16 20 24 28 32 36 40 44 48 52; do 54 + summarize "pb-libbpf nr_prod $b" "$($RUN_RB_BENCH -p$b --rb-batch-cnt 50 --rb-sample-rate 50 pb-libbpf)" 55 + done 56 + 52 57 header "Ringbuf, multi-producer contention in overwrite mode, no consumer" 53 58 for b in 1 2 3 4 8 12 16 20 24 28 32 36 40 44 48 52; do 54 59 summarize "rb-prod nr_prod $b" "$($RUN_BENCH -p$b --rb-batch-cnt 50 --rb-overwrite --rb-bench-producer rb-libbpf)"