All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Alexei Starovoitov <ast@fb.com>
Cc: Andrii Nakryiko <andriin@fb.com>, bpf <bpf@vger.kernel.org>,
	Networking <netdev@vger.kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 3/3] selftest/bpf: add BPF triggring benchmark
Date: Fri, 8 May 2020 10:50:07 -0700	[thread overview]
Message-ID: <CAEf4BzZoMZNADA6-_4CUtV+YuBWeuNF9EqDT-SbUNhOMmw_uTQ@mail.gmail.com> (raw)
In-Reply-To: <35e656a9-91d1-203d-44d4-ea5f002ad232@fb.com>

On Fri, May 8, 2020 at 9:40 AM Alexei Starovoitov <ast@fb.com> wrote:
>
> On 5/8/20 12:05 AM, Andrii Nakryiko wrote:
> >
> > base      :    9.200 ± 0.319M/s
> > fentry    :    8.955 ± 0.241M/s
>
> > +SEC("fentry/__x64_sys_getpgid")
> > +int bench_trigger_fentry(void *ctx)
> > +{
> > +     __sync_add_and_fetch(&hits, 1);
> > +     return 0;
> > +}
>
> adding 'lock xadd' is not cheap.
> I wonder how much of the delta come from it and from the rest of
> trampoline.

Yeah, could be, though count-global/count-local benchmarks get to
150Mops/s under no-sharing scenario, so effect shouldn't be that high.
Well, in any case, 9Mops/s is more than enough for my cases :)

      reply	other threads:[~2020-05-08 17:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  7:05 [PATCH bpf-next 0/3] Add benchmark runner and few benchmarks Andrii Nakryiko
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 [this message]

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=CAEf4BzZoMZNADA6-_4CUtV+YuBWeuNF9EqDT-SbUNhOMmw_uTQ@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.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.