[PATCH bpf-next 3/3] riscv, bpf: Use bpf_prog_pack for RV64 bpf trampoline
Song Liu
song at kernel.org
Mon Jan 29 13:58:18 PST 2024
On Tue, Jan 23, 2024 at 2:32 AM Pu Lehui <pulehui at huaweicloud.com> wrote:
>
> From: Pu Lehui <pulehui at huawei.com>
>
> We used bpf_prog_pack to aggregate bpf programs into huge page to
> relieve the iTLB pressure on the system. We can apply it to bpf
> trampoline, as Song had been implemented it in core and x86 [0]. This
> patch is going to use bpf_prog_pack to RV64 bpf trampoline. Since Song
> and Puranjay have done a lot of work for bpf_prog_pack on RV64,
> implementing this function will be easy. But one thing to mention is
> that emit_call in RV64 will generate the maximum number of instructions
> during dry run, but during real patching it may be optimized to 1
> instruction due to distance. This is no problem as it does not overflow
> the allocated RO image.
>
> Link: https://lore.kernel.org/all/20231206224054.492250-1-song@kernel.org [0]
> Signed-off-by: Pu Lehui <pulehui at huawei.com>
Acked-by: Song Liu <song at kernel.org>
More information about the linux-riscv
mailing list