DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] dispatcher: add cache guard to per-lcore struct
@ 2024-02-20  8:35 Mattias Rönnblom
  2024-02-20  8:46 ` Morten Brørup
  0 siblings, 1 reply; 3+ messages in thread
From: Mattias Rönnblom @ 2024-02-20  8:35 UTC (permalink / raw)
  To: dev; +Cc: hofors, Thomas Monjalon, David Marchand, Mattias Rönnblom

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

diff --git a/lib/dispatcher/rte_dispatcher.c b/lib/dispatcher/rte_dispatcher.c
index 95dd41b818..f546d75c0b 100644
--- a/lib/dispatcher/rte_dispatcher.c
+++ b/lib/dispatcher/rte_dispatcher.c
@@ -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 {
-- 
2.34.1


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

* RE: [PATCH] dispatcher: add cache guard to per-lcore struct
  2024-02-20  8:35 [PATCH] dispatcher: add cache guard to per-lcore struct Mattias Rönnblom
@ 2024-02-20  8:46 ` Morten Brørup
  2024-02-22  6:59   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2024-02-20  8:46 UTC (permalink / raw)
  To: Mattias Rönnblom, dev; +Cc: hofors, Thomas Monjalon, David Marchand

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


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

* Re: [PATCH] dispatcher: add cache guard to per-lcore struct
  2024-02-20  8:46 ` Morten Brørup
@ 2024-02-22  6:59   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2024-02-22  6:59 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev, hofors, David Marchand, Morten Brørup

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.



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

end of thread, other threads:[~2024-02-22  6:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-20  8:35 [PATCH] dispatcher: add cache guard to per-lcore struct Mattias Rönnblom
2024-02-20  8:46 ` Morten Brørup
2024-02-22  6:59   ` Thomas Monjalon

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