[dpdk-dev] [PATCH v6] eal: add cache-line demote support
David Christensen
drc at linux.vnet.ibm.com
Mon Oct 12 21:31:59 CEST 2020
On 10/12/20 3:19 AM, 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.maslekar at intel.com>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
>
> ---
> v6: marked rte_cldemote as experimental
> added rte_cldemote call in existing app/test_prefetch.c
>
> v5: documentation updated
> fixed formatting issue in release notes
> added Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> *
> v4: updated bold text for title and fixed margin in release notes
> *
> v3: fixed warning regarding whitespace
> *
> v2: documentation updated
> ---
> ---
> app/test/test_prefetch.c | 4 ++++
> doc/guides/rel_notes/release_20_11.rst | 7 +++++++
> lib/librte_eal/arm/include/rte_prefetch_32.h | 8 ++++++++
> lib/librte_eal/arm/include/rte_prefetch_64.h | 8 ++++++++
> lib/librte_eal/include/generic/rte_prefetch.h | 16 ++++++++++++++++
> lib/librte_eal/ppc/include/rte_prefetch.h | 8 ++++++++
> lib/librte_eal/x86/include/rte_prefetch.h | 12 ++++++++++++
> 7 files changed, 63 insertions(+)
...snip...
> diff --git a/lib/librte_eal/ppc/include/rte_prefetch.h b/lib/librte_eal/ppc/include/rte_prefetch.h
> index 9ba07c8..9630227 100644
> --- a/lib/librte_eal/ppc/include/rte_prefetch.h
> +++ b/lib/librte_eal/ppc/include/rte_prefetch.h
> @@ -11,6 +11,7 @@
> #endif
>
> #include <rte_common.h>
> +#include <rte_compat.h>
> #include "generic/rte_prefetch.h"
>
> static inline void rte_prefetch0(const volatile void *p)
> @@ -34,6 +35,13 @@ static inline void rte_prefetch_non_temporal(const volatile void *p)
> rte_prefetch0(p);
> }
>
> +static inline void
> +__rte_experimental
> +rte_cldemote(const volatile void *p)
> +{
> + RTE_SET_USED(p);
> +}
> +
> #ifdef __cplusplus
> }
> #endif
Don't see an equivalent operation in the 3.1 ISA for POWER processors,
so NOP is the right implementation.
Acked-by: David Christensen <drc at linux.vnet.ibm.com>
More information about the dev
mailing list