From: Pu Lehui <pulehui@huaweicloud.com>
To: "Björn Töpel" <bjorn@kernel.org>,
bpf@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
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>,
Puranjay Mohan <puranjay@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alexandre Ghiti <alex@ghiti.fr>, Pu Lehui <pulehui@huawei.com>,
Pu Lehui <pulehui@huaweicloud.com>
Subject: [PATCH bpf-next 0/4] riscv, bpf: Miscellaneous JIT optimizations
Date: Tue, 1 Dec 2026 13:34:00 +0000 [thread overview]
Message-ID: <20261201133404.2227100-1-pulehui@huaweicloud.com> (raw)
From: Pu Lehui <pulehui@huawei.com>
This series brings four improvements to the RISC-V BPF JIT:
- Patch 1 fixes forward jump offset calculation across JIT passes so
large programs (e.g. no_limits/dump) converge in 2 passes instead of
hitting NR_JIT_ITERATIONS.
- Patch 2 reuses the tailcall epilogue across multiple bpf_tail_call()
sites on RV64 to shrink JIT image size.
- Patch 3 introduces a per-image PLT on RV64 to eliminate stop_machine()
in bpf_arch_text_poke(), reducing trampoline attach/detach latency.
- Patch 4 removes the now-redundant RV64 arch_bpf_trampoline_skip() and
4-byte-aligns the skip nop in invoke_bpf_prog().
This series has been tested with riscv-bpf-daily and passed:
https://github.com/pulehui/riscv-bpf-daily/pull/26
Pu Lehui (4):
riscv, bpf: Fix forward jump offset calculation during JIT passes
riscv, bpf: Reuse tailcall epilogue across tailcall sites
riscv, bpf: Eliminate stop_machine in bpf_arch_text_poke with
per-image PLT
riscv, bpf: Remove arch_bpf_trampoline_skip
arch/riscv/net/bpf_jit.h | 19 ++--
arch/riscv/net/bpf_jit_comp32.c | 5 +-
arch/riscv/net/bpf_jit_comp64.c | 192 +++++++++++++++++++++++---------
arch/riscv/net/bpf_jit_core.c | 51 ++++-----
4 files changed, 176 insertions(+), 91 deletions(-)
--
2.34.1
next reply other threads:[~2026-12-01 13:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 13:34 Pu Lehui [this message]
2026-12-01 13:34 ` [PATCH bpf-next 1/4] riscv, bpf: Fix forward jump offset calculation during JIT passes Pu Lehui
2026-12-01 13:34 ` [PATCH bpf-next 2/4] riscv, bpf: Reuse tailcall epilogue across tailcall sites Pu Lehui
2026-12-01 13:34 ` [PATCH bpf-next 3/4] riscv, bpf: Eliminate stop_machine in bpf_arch_text_poke with per-image PLT Pu Lehui
2026-12-01 14:19 ` bot+bpf-ci
2026-12-01 13:34 ` [PATCH bpf-next 4/4] riscv, bpf: Remove arch_bpf_trampoline_skip Pu Lehui
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=20261201133404.2227100-1-pulehui@huaweicloud.com \
--to=pulehui@huaweicloud.com \
--cc=alex@ghiti.fr \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bjorn@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=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=pulehui@huawei.com \
--cc=puranjay@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®