BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] riscv, bpf: Miscellaneous JIT optimizations
@ 2026-12-01 13:34 Pu Lehui
  2026-12-01 13:34 ` [PATCH bpf-next 1/4] riscv, bpf: Fix forward jump offset calculation during JIT passes Pu Lehui
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Pu Lehui @ 2026-12-01 13:34 UTC (permalink / raw)
  To: Björn Töpel, bpf, linux-riscv, linux-kernel
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Eduard Zingerman, Kumar Kartikeya Dwivedi, Martin KaFai Lau,
	Song Liu, Yonghong Song, Jiri Olsa, Emil Tsalapatis,
	Ihor Solodrai, Puranjay Mohan, Paul Walmsley, Palmer Dabbelt,
	Alexandre Ghiti, Pu Lehui, Pu Lehui

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-01 14:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01 13:34 [PATCH bpf-next 0/4] riscv, bpf: Miscellaneous JIT optimizations Pu Lehui
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:51   ` sashiko-bot
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox