From: Qiliang Yuan <odys.yuan@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Eduard Zingerman <eddyz87@gmail.com>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
Jiri Olsa <jolsa@kernel.org>,
Emil Tsalapatis <emil@etsalapatis.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
Shuah Khan <shuah@kernel.org>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH bpf-next 0/4] bpf: Apply the rewrites of bpf_do_misc_fixups() at once
Date: Fri, 2 Oct 2026 21:25:06 +0800 [thread overview]
Message-ID: <20261002132506.4108655-1-odys.yuan@gmail.com> (raw)
In-Reply-To: <DLUBNPLXRU86.358M4SOQJIGWI@gmail.com>
On Fri, Oct 02, 2026 at 11:39 AM Alexei Starovoitov wrote:
> That's not going to fly.
> After this series there are two implementations of the same thing.
[...]
> Jiong's RFC converted all passes and deleted the old code in the
> last patch:
> https://lore.kernel.org/bpf/1562275611-31790-1-git-send-email-jiong.wang@netronome.com/
> Pls do the same in one series. One-off patches can be add + commit.
Agreed. v2 will move all passes to the list, turn
bpf_patch_insn_data() into add + commit, and remove
adjust_insn_aux_data(), bpf_adj_branches() and the per-patch adjust
helpers in the last patch. That also covers the bot's comment on
patch 1.
> That's veristat on x86.
> test_progs loads pyperf with BPF_F_TEST_RND_HI32, and s390, riscv,
> powerpc need zext. bpf_opt_subreg_zext_lo32_rnd_hi32() does more
> patches than misc_fixups there, I think, and it has one call site.
Right. On x86 with BPF_F_TEST_RND_HI32:
patches load time
zext misc flag off flag on
pyperf180 4610 930 0.587 s 1.390 s
pyperf600 7620 1530 1.496 s 4.105 s
Patching is 67% of the profile of pyperf180 with the flag, 57% in
bpf_opt_subreg_zext_lo32_rnd_hi32() alone. v2 will report both cases.
> That's unexpected. Pls share the perf report.
perf record -F 4999 --all-kernel -g -- veristat -q pyperf180.bpf.o,
bpf-next 6a75c73eebd4, x86_64 VM:
Children Self
50.66% 0.12% bpf_compute_live_registers
50.43% 0.00% bpf_compute_subprog_arg_access
50.29% 0.67% analyze_subprog
49.47% 8.99% compute_subprog_args.constprop.0
39.08% 8.43% arg_track_join
25.71% 25.67% __arg_track_join
24.97% 0.62% do_check_common
21.49% 0.04% __bpf_patch_insn_data
4.07% 3.99% arg_track_eq
pyperf180 has 2 subprogs, on_event and the global __get_frame_data,
but analyze_subprog() ran 458 times during that veristat run, which
loaded 6 programs counting libbpf's probes.
prev parent reply other threads:[~2026-10-02 13:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 9:35 Qiliang Yuan
2026-10-01 9:35 ` [PATCH bpf-next 1/4] bpf: Add a list of deferred instruction patches Qiliang Yuan
2026-10-01 10:27 ` bot+bpf-ci
2026-10-01 9:35 ` [PATCH bpf-next 2/4] bpf: Queue the rewrites of bpf_do_misc_fixups() and apply them at once Qiliang Yuan
2026-10-01 10:27 ` bot+bpf-ci
2026-10-02 13:25 ` Qiliang Yuan
2026-10-01 9:35 ` [PATCH bpf-next 3/4] bpf: Drop the constant delta from bpf_do_misc_fixups() Qiliang Yuan
2026-10-01 9:35 ` [PATCH bpf-next 4/4] selftests/bpf: Test jumps around patches of bpf_do_misc_fixups() Qiliang Yuan
2026-10-02 11:39 ` [PATCH bpf-next 0/4] bpf: Apply the rewrites of bpf_do_misc_fixups() at once Alexei Starovoitov
2026-10-02 13:25 ` Qiliang Yuan [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=20261002132506.4108655-1-odys.yuan@gmail.com \
--to=odys.yuan@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=ihor.solodrai@linux.dev \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=shuah@kernel.org \
--cc=song@kernel.org \
--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
all inboxes | Powered by JetHome®