On 9/9/20 6:16 PM, Omkar Maslekar wrote:
rte_cldemote is similar to a prefetch hint - in reverse. cldemote(addr)
enables software to hint to hardware that line is likely to be shared.
Useful in core-to-core communications where cache-line is likely to be
shared. ARM and PPC implementation is provided with NOP and can be added
if any equivalent instructions could be used for implementation on those
architectures.

Signed-off-by: Omkar Maslekar <omkar.masle...@intel.com>
---

...

diff --git a/lib/librte_eal/ppc/include/rte_prefetch.h 
b/lib/librte_eal/ppc/include/rte_prefetch.h
index 9ba07c8..3fe9655 100644
--- a/lib/librte_eal/ppc/include/rte_prefetch.h
+++ b/lib/librte_eal/ppc/include/rte_prefetch.h
@@ -34,6 +34,11 @@ static inline void rte_prefetch_non_temporal(const volatile 
void *p)
        rte_prefetch0(p);
  }

+static inline void rte_cldemote(const volatile void *p)
+{
+       RTE_SET_USED(p);
+}
+
  #ifdef __cplusplus
  }
  #endif

For POWER there's an instruction defined in the ISA which is the most similar, miso (i.e. Make It So), but the instruction is interpreted as a NOP in the POWER8/POWER9 CPUs, so NOP is the right choice for PPC at this time.

Dave

Reply via email to