dispatcher: add cache guard to per-lcore struct
Checks
Commit Message
Add cache guard to per-lcore data structures to prevent false sharing
in scenarios where a next-N-lines (or similar) hardware prefetcher is
used.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
lib/dispatcher/rte_dispatcher.c | 1 +
1 file changed, 1 insertion(+)
Comments
> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> Sent: Tuesday, 20 February 2024 09.35
>
> Add cache guard to per-lcore data structures to prevent false sharing
> in scenarios where a next-N-lines (or similar) hardware prefetcher is
> used.
>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> ---
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
20/02/2024 09:46, Morten Brørup:
> > From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> > Sent: Tuesday, 20 February 2024 09.35
> >
> > Add cache guard to per-lcore data structures to prevent false sharing
> > in scenarios where a next-N-lines (or similar) hardware prefetcher is
> > used.
> >
> > Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
>
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Applied, thanks.
@@ -48,6 +48,7 @@ struct rte_dispatcher_lcore {
struct rte_dispatcher_lcore_port ports[EVD_MAX_PORTS_PER_LCORE];
struct rte_dispatcher_handler handlers[EVD_MAX_HANDLERS];
struct rte_dispatcher_stats stats;
+ RTE_CACHE_GUARD;
} __rte_cache_aligned;
struct rte_dispatcher {