DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] eal/riscv: implement prefetch using zicbop
@ 2024-05-30 17:19 Daniel Gregory
  2024-05-30 17:19 ` [PATCH 1/2] eal: add flag to hide generic prefetch_write Daniel Gregory
  2024-05-30 17:19 ` [PATCH 2/2] eal/riscv: add support for zicbop extension Daniel Gregory
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Gregory @ 2024-05-30 17:19 UTC (permalink / raw)
  To: Stanislaw Kardach
  Cc: Bruce Richardson, Tyler Retzlaff, dev, Liang Ma, Punit Agrawal,
	Daniel Gregory

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(-)

-- 
2.39.2


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

end of thread, other threads:[~2024-05-31  8:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30 17:19 [PATCH 0/2] eal/riscv: implement prefetch using zicbop Daniel Gregory
2024-05-30 17:19 ` [PATCH 1/2] eal: add flag to hide generic prefetch_write Daniel Gregory
2024-05-30 17:19 ` [PATCH 2/2] eal/riscv: add support for zicbop extension Daniel Gregory
2024-05-31  8:49   ` Daniel Gregory

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).