Skip to contentSkip to conversation

selftests/bpf: fix ringbuf benchmark output

PATCH Superseded Andrew Werner 2 participants 3 messages Jul 19, 2023

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/bpf: fix ringbuf benchmark output

The headers were confusing.

---
 tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +2 -2
index 91e3567962ff..8dd97f5108f0 100755
@@ -6,12 +6,12 @@ set -eufo pipefail
 
 RUN_RB_BENCH="$RUN_BENCH -c1"
 
-header "Single-producer, parallel producer"
+header "Single-consumer, parallel producer"
 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do
 	summarize $b "$($RUN_RB_BENCH $b)"
 done
 
-header "Single-producer, parallel producer, sampled notification"
+header "Single-consumer, parallel producer, sampled notification"
 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do
 	summarize $b "$($RUN_RB_BENCH --rb-sampled $b)"
 done
Signature · 1 line
2.39.2
#1 lore raw
Quoted 3 lines · Andrew Werner

The headers were confusing.
---

SOB is missing.

commit log is too terse.
Pls explain what you're fixing.

Quoted 9 lines
 tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +0 -0
index 91e3567962ff..8dd97f5108f0 100755
@@ -6,12 +6,12 @@ set -eufo pipefail
 

tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh set -eufo pipefail · line 14

Quoted 10 lines
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +2 -2
 RUN_RB_BENCH="$RUN_BENCH -c1"
 
-header "Single-producer, parallel producer"
+header "Single-consumer, parallel producer"
 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do
        summarize $b "$($RUN_RB_BENCH $b)"
 done
 
-header "Single-producer, parallel producer, sampled notification"
+header "Single-consumer, parallel producer, sampled notification"

Single-producer, consumer/producer competing on the same CPU, low batch count

should also be fixed?

#2 lore raw
Quoted 7 lines · Alexei Starovoitov
Quoted 3 lines · Andrew Werner

The headers were confusing.
---

SOB is missing.

Ack.

Quoted 3 lines

commit log is too terse.
Pls explain what you're fixing.

Ack.

Quoted 17 lines
Quoted 17 lines
 tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +1 -1
index 91e3567962ff..8dd97f5108f0 100755
@@ -6,12 +6,12 @@ set -eufo pipefail
 
 RUN_RB_BENCH="$RUN_BENCH -c1"
 
-header "Single-producer, parallel producer"
+header "Single-consumer, parallel producer"
 for b in rb-libbpf rb-custom pb-libbpf pb-custom; do
        summarize $b "$($RUN_RB_BENCH $b)"
 done
 
Quoted 6 lines

tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh set -eufo pipefail · line 14

Quoted 2 lines
tools/testing/selftests/bpf/benchs/run_bench_ringbufs.sh +1 -1
-header "Single-producer, parallel producer, sampled notification"
+header "Single-consumer, parallel producer, sampled notification"

Single-producer, consumer/producer competing on the same CPU, low batch count

should also be fixed?

In retrospect, having now reread these, I think that they were not mistakes. Ringbuf is always implicitly a single consumer concept. The point was to highlight that there is a single producer, and that it is running in parallel.

I'll more generally take a more in depth pass at making these headers clearer and more consistent, and I'll address the other items in v2. Thanks for the review!