sync: rvck #128: Backport subject : "bpf JIT optimization based on Zba and Zbb extension"#170
Merged
Conversation
mainline inclusion from mainline-v6.8-rc3 commit e33758f7493c9ad8cf6960bcf7c70f5761f3acfb category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- For code unification, add emit_sextw wrapper to unify all the 32-bit sign-extension operations. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 6f06ac4)
mainline inclusion from mainline-v6.8-rc3 commit 914c7a5ff18a225f7df254ae3433574f3d47b711 category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- For code unification, add emit_zextw wrapper to unify all the 32-bit zero-extension operations. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit a0c7a3d)
mainline inclusion from mainline-v6.8-rc3 commit 361db44c3c59cde05e9926647f16255e274a37f4 category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- There are many extension helpers in the current branch instructions, and the implementation is a bit complicated. We simplify this logic through two simple extension helpers with alternate register. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 19681f2)
mainline inclusion from mainline-v6.8-rc3 commit 647b93f65daa128d9a0e4aac744a5fcf5f58b2d2 category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- Add necessary Zbb instructions introduced by [0] to reduce code size and improve performance of RV64 JIT. Meanwhile, a runtime deteted helper is added to check whether the CPU supports Zbb instructions. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 2c5303b)
mainline inclusion from mainline-v6.8-rc3 commit 519fb722bea09ae2664ad21f8ef4360fb799eb2f category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- Add 8-bit and 16-bit sign-extention wraper with Zbb support to optimize sign-extension mov instructions. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 558c01d)
mainline inclusion from mainline-v6.8-rc3 commit 06a33d024838414432b6c0f51f994e7f1695b74f category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- Optimize bswap instructions by rev8 Zbb instruction conbined with srli instruction. And Optimize 16-bit zero-extension with Zbb support. Signed-off-by: Pu Lehui <pulehui@huawei.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit 6c2e520)
mainline inclusion from mainline-v6.10-rc1 commit c12603e76ef666ce5c51a9d6faf155c9e3de7601 category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- The Zba extension provides add.uw insn which can be used to implement zext.w with rs2 set as ZERO. Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit c6071e5)
mainline inclusion from mainline-v6.10-rc2 commit 96a27ee76f0e95b56f94b6902da7a5ebef372612 category: feature bugzilla: RVCK-Project/rvck#127 -------------------------------- Zba extension is very useful for generating addresses that index into array of basic data types. This patch introduces sh2add and sh3add helpers for RV32 and RV64 respectively, to accelerate addressing for array of unsigned long data. Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: gaorui <gao.rui@zte.com.cn> Signed-off-by: Mingzheng Xing <xingmingzheng@iscas.ac.cn> (cherry picked from commit f8d2f35)
|
开始测试 log: https://github.com/RVCK-Project/rvck-olk/actions/runs/24122513430 参数解析结果
测试完成 详细结果:RVCK result
Kunit Test Result[07:08:47] Testing complete. Ran 454 tests: passed: 442, skipped: 12 Kernel Build ResultKernel build succeeded: RVCK-Project/rvck-olk/170__1/ cef16ca11321b80511f5af50abc6c38c /srv/guix_result/533dd66fa4c604519fc3fc338b03e6e753d3291c/Image LAVA Checkargs:
result:Lava check done! lava log: https://lava.oerv.ac.cn/scheduler/job/1762 lava result count: [fail]: 18, [pass]: 1588, [skip]: 293 Check Patch Result
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sync commits from rvck PR #128.
Source PR: RVCK-Project/rvck#128
Commits
6f06ac458f15riscv, bpf: Unify 32-bit sign-extension to emit_sextwa0c7a3d81c80riscv, bpf: Unify 32-bit zero-extension to emit_zextw19681f23b61friscv, bpf: Simplify sext and zext logics in branch instructions2c5303baa8e9riscv, bpf: Add necessary Zbb instructions558c01d48968riscv, bpf: Optimize sign-extention mov insns with Zbb support6c2e5203aa64riscv, bpf: Optimize bswap insns with Zbb supportc6071e5b639friscv, bpf: Optimize zextw insn with Zba extensionf8d2f35f1043riscv, bpf: Introduce shift add helper with Zba optimization