Skip to content

eal/riscv: implement prefetch using zicbop

Daniel Gregory dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2eal: add flag to hide generic prefetch_writelib/eal/include/generic/rte_prefetch.h+31 -160 replies
2/2eal/riscv: add support for zicbop extensionconfig/riscv/meson.build lib/eal/riscv/include/rte_prefetch.h+59 -43 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] eal/riscv: implement prefetch using zicbop

Instructions from RISC-V's Zicbop extension can be used to implement the rte_prefetch* family of functions. On modern versions of GCC (13.1.0+) and Clang (17.0.1+), these are emitted by __builtin_prefetch() when the extension is present.

In order to support older compiler versions, this patchset manually emits these instructions using inline assembly. To do this, I have added a new flag, RTE_PREFETCH_WRITE_ARCH_DEFINED, that
(similarly to RTE_WAIT_UNTIL_EQUAL_ARCH_DEFINED) hides the generic implementation of rte_prefetch*_write.

I am still in the process of acquiring hardware that supports this extension, so I haven't tested how this affects performance yet.

Daniel Gregory (2):
eal: add flag to hide generic prefetch_write
eal/riscv: add support for zicbop extension

 config/riscv/meson.build               |  6 +++
 lib/eal/include/generic/rte_prefetch.h | 47 +++++++++++++--------
 lib/eal/riscv/include/rte_prefetch.h   | 57 ++++++++++++++++++++++++--
 3 files changed, 90 insertions(+), 20 deletions(-)
Signature · 1 line
2.39.2