All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andriin@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>, <ast@fb.com>,
	<daniel@iogearbox.net>
Cc: <andrii.nakryiko@gmail.com>, <kernel-team@fb.com>,
	Andrii Nakryiko <andriin@fb.com>
Subject: [PATCH bpf-next 0/3] Add benchmark runner and few benchmarks
Date: Fri, 8 May 2020 00:05:45 -0700	[thread overview]
Message-ID: <20200508070548.2358701-1-andriin@fb.com> (raw)

Add generic benchmark runner framework which simplifies writing various
performance benchmarks in a consistent fashion.  This framework will be used
in follow up patches to test performance of perf buffer and ring buffer as
well.

Patch #1 adds generic runner implementation and atomic counter benchmarks to
validate benchmark runner's behavior.

Patch #2 implements test_overhead benchmark as part of bench runner. It also
add fmod_ret BPF program type to a set of benchmarks.

Patch #3 tests faster alternatives to set_task_comm() approach, tested in
test_overhead, in search for minimal-overhead way to trigger BPF program
execution from user-space on demand.

Andrii Nakryiko (3):
  selftests/bpf: add benchmark runner infrastructure
  selftest/bpf: fmod_ret prog and implement test_overhead as part of
    bench
  selftest/bpf: add BPF triggring benchmark

 tools/testing/selftests/bpf/.gitignore        |   1 +
 tools/testing/selftests/bpf/Makefile          |  15 +-
 tools/testing/selftests/bpf/bench.c           | 390 ++++++++++++++++++
 tools/testing/selftests/bpf/bench.h           |  74 ++++
 tools/testing/selftests/bpf/bench_count.c     |  91 ++++
 tools/testing/selftests/bpf/bench_rename.c    | 195 +++++++++
 tools/testing/selftests/bpf/bench_trigger.c   | 167 ++++++++
 .../selftests/bpf/prog_tests/test_overhead.c  |  14 +-
 .../selftests/bpf/progs/test_overhead.c       |   6 +
 .../selftests/bpf/progs/trigger_bench.c       |  47 +++
 10 files changed, 998 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/bench.c
 create mode 100644 tools/testing/selftests/bpf/bench.h
 create mode 100644 tools/testing/selftests/bpf/bench_count.c
 create mode 100644 tools/testing/selftests/bpf/bench_rename.c
 create mode 100644 tools/testing/selftests/bpf/bench_trigger.c
 create mode 100644 tools/testing/selftests/bpf/progs/trigger_bench.c

-- 
2.24.1


             reply	other threads:[~2020-05-08  7:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  7:05 Andrii Nakryiko [this message]
2020-05-08  7:05 ` [PATCH bpf-next 1/3] selftests/bpf: add benchmark runner infrastructure Andrii Nakryiko
2020-05-08 15:49   ` John Fastabend
2020-05-08 17:59     ` Andrii Nakryiko
2020-05-08  7:05 ` [PATCH bpf-next 2/3] selftest/bpf: fmod_ret prog and implement test_overhead as part of bench Andrii Nakryiko
2020-05-08 15:57   ` John Fastabend
2020-05-08 18:01     ` Andrii Nakryiko
2020-05-08  7:05 ` [PATCH bpf-next 3/3] selftest/bpf: add BPF triggring benchmark Andrii Nakryiko
2020-05-08 16:02   ` John Fastabend
2020-05-08 16:40   ` Alexei Starovoitov
2020-05-08 17:50     ` 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=20200508070548.2358701-1-andriin@fb.com \
    --to=andriin@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.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.