BPF List
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: bpf@vger.kernel.org, ast@kernel.org
Cc: andrii@kernel.org, daniel@iogearbox.net, martin.lau@linux.dev,
	 kernel-team@fb.com, yonghong.song@linux.dev
Subject: Re: [PATCH bpf-next v1 1/2] bpf: force checkpoints at loop back-edges
Date: Wed, 09 Oct 2024 02:23:11 -0700	[thread overview]
Message-ID: <e6d6ffc2496a2e5845293ee9b9e7d594a7ad7d1c.camel@gmail.com> (raw)
In-Reply-To: <20241009021254.2805446-1-eddyz87@gmail.com>

On Tue, 2024-10-08 at 19:12 -0700, Eduard Zingerman wrote:

[...]

> This patch forcibly enables checkpoints for each loop back-edge.
> This helps with the programs in question, as verification of both
> syzbot program and reduced snippet finishes in ~2.5 sec.

[...]

> File                        Program                               Insns     (DIFF)  States       (DIFF)
> --------------------------  ------------------------------------  ----------------  -------------------
> ...
> pyperf600.bpf.o             on_event                               -53870 (-9.81%)      -3000 (-10.16%)
> ...

fwiw, this patch speeds up verification of pyperf600 by a small margin,
sufficient for it to pass in combination with jump history bump when LLVM20 is used.

# ./veristat pyperf600.bpf.o no_alu32/pyperf600.bpf.o cpuv4/pyperf600.bpf.o
...
File             Program   Verdict  Duration (us)   Insns  States  Peak states
---------------  --------  -------  -------------  ------  ------  -----------
pyperf600.bpf.o  on_event  success        2400571  872914   26490        25480
pyperf600.bpf.o  on_event  success        2460908  947038   26090        25330
pyperf600.bpf.o  on_event  success        2158117  788481   26329        25368
---------------  --------  -------  -------------  ------  ------  -----------

W/o this patch jump history bump is not sufficient to get no_alu32 version verified,
instruction limit is reached.

The draft is here:
https://github.com/eddyz87/bpf/tree/jmp-history-pyperf600

[...]


  parent reply	other threads:[~2024-10-09  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  2:12 [PATCH bpf-next v1 1/2] bpf: force checkpoints at loop back-edges Eduard Zingerman
2024-10-09  2:12 ` [PATCH bpf-next v1 2/2] selftests/bpf: test with a very short loop Eduard Zingerman
2024-10-09  9:23 ` Eduard Zingerman [this message]
2024-10-09 19:41 ` [PATCH bpf-next v1 1/2] bpf: force checkpoints at loop back-edges Eduard Zingerman
2024-10-10  1:08   ` Alexei Starovoitov
2024-10-10 22:13     ` Andrii Nakryiko
2024-10-10 22:40       ` Eduard Zingerman
2024-10-10 22:52         ` Eduard Zingerman
2024-10-10 23:23           ` Alexei Starovoitov
2024-10-18  2:17             ` Eduard Zingerman
2024-10-11  1:44         ` 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=e6d6ffc2496a2e5845293ee9b9e7d594a7ad7d1c.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@linux.dev \
    --cc=yonghong.song@linux.dev \
    /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