summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bench.c
diff options
context:
space:
mode:
authorMartin KaFai Lau <martin.lau@kernel.org>2023-03-22 14:52:46 -0700
committerAlexei Starovoitov <ast@kernel.org>2023-03-25 19:52:52 -0700
commitcbe9d93d58b16b5912498ea42b5173022fff7c04 (patch)
treec5ac30ad68786fa9636d46cb2dbb8d1f36fccc04 /tools/testing/selftests/bpf/bench.c
parentd8db84d71c0e539f7ce902e2fe297e535ba4d46c (diff)
downloadlinux-stable-cbe9d93d58b16b5912498ea42b5173022fff7c04.tar.gz
linux-stable-cbe9d93d58b16b5912498ea42b5173022fff7c04.tar.bz2
linux-stable-cbe9d93d58b16b5912498ea42b5173022fff7c04.zip
selftests/bpf: Add bench for task storage creation
This patch adds a task storage benchmark to the existing local-storage-create benchmark. For task storage, ./bench --storage-type task --batch-size 32: bpf_ma: Summary: creates 30.456 ± 0.507k/s ( 30.456k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.962 ± 0.486k/s ( 31.962k/prod), 6.13 kmallocs/create ./bench --storage-type task --batch-size 64: bpf_ma: Summary: creates 30.197 ± 1.476k/s ( 30.197k/prod), 6.08 kmallocs/create no bpf_ma: Summary: creates 31.103 ± 0.297k/s ( 31.103k/prod), 6.13 kmallocs/create Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://lore.kernel.org/r/20230322215246.1675516-6-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/bench.c')
-rw-r--r--tools/testing/selftests/bpf/bench.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bench.c b/tools/testing/selftests/bpf/bench.c
index dc3827c1f139..d9c080ac1796 100644
--- a/tools/testing/selftests/bpf/bench.c
+++ b/tools/testing/selftests/bpf/bench.c
@@ -278,6 +278,7 @@ extern struct argp bench_local_storage_argp;
extern struct argp bench_local_storage_rcu_tasks_trace_argp;
extern struct argp bench_strncmp_argp;
extern struct argp bench_hashmap_lookup_argp;
+extern struct argp bench_local_storage_create_argp;
static const struct argp_child bench_parsers[] = {
{ &bench_ringbufs_argp, 0, "Ring buffers benchmark", 0 },
@@ -288,6 +289,7 @@ static const struct argp_child bench_parsers[] = {
{ &bench_local_storage_rcu_tasks_trace_argp, 0,
"local_storage RCU Tasks Trace slowdown benchmark", 0 },
{ &bench_hashmap_lookup_argp, 0, "Hashmap lookup benchmark", 0 },
+ { &bench_local_storage_create_argp, 0, "local-storage-create benchmark", 0 },
{},
};