bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Networking <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH bpf-next 3/3] selftests/bpf: add pyperf scale test
Date: Wed, 22 May 2019 00:49:56 +0000	[thread overview]
Message-ID: <2a067f93-c607-34fc-1c34-611ed4a8f6a0@fb.com> (raw)
In-Reply-To: <CAEf4BzZrK1Fw211ef9psBxOoP_vV9tH2Hre1DJSqUsp7iX7bSg@mail.gmail.com>

On 5/21/19 5:36 PM, Andrii Nakryiko wrote:
>> --- /dev/null
>> +++ b/tools/testing/selftests/bpf/progs/pyperf.h
>> @@ -0,0 +1,268 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +// Copyright (c) 2019 Facebook
> 
> Maybe let's include a link to an up-to-date real tool, that was used
> to create this scale test in BCC:
> https://github.com/iovisor/bcc/blob/master/examples/cpp/pyperf/PyPerfBPFProgram.cc

I thought about it, but decided not to,
since this hack is not exactly the same.
I tried to keep an idea of the loop though
with roughly the same number of probe_reads
and 'if' conditions, but was chopping all bcc-ism out of it.
In the commit log: "Add a snippet of pyperf bpf program"
By "a snippet" I meant that it's not the same thing,
but close enough from verifier complexity point of view.
Existing pyperf works around the lack of loops with tail-calls :(
I'm thinking to reuse this hack as future bounded loop test too.

Another reason to avoid the link is I'm hoping that pyperf
will move from 'examples' directory there into proper tool,
so the link will become broken.

  reply	other threads:[~2019-05-22  0:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 23:09 [PATCH bpf-next 0/3] bpf: increase jmp sequence limit Alexei Starovoitov
2019-05-21 23:09 ` [PATCH bpf-next 1/3] bpf: bump " Alexei Starovoitov
2019-05-21 23:09 ` [PATCH bpf-next 2/3] selftests/bpf: adjust verifier scale test Alexei Starovoitov
2019-05-21 23:09 ` [PATCH bpf-next 3/3] selftests/bpf: add pyperf " Alexei Starovoitov
2019-05-22  0:36   ` Andrii Nakryiko
2019-05-22  0:49     ` Alexei Starovoitov [this message]
2019-05-22  0:56       ` Andrii Nakryiko
2019-05-22  0:37 ` [PATCH bpf-next 0/3] bpf: increase jmp sequence limit 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=2a067f93-c607-34fc-1c34-611ed4a8f6a0@fb.com \
    --to=ast@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).