From: "Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
To: <dev@dpdk.org>
Cc: hofors@lysator.liu.se, "Thomas Monjalon" <thomas@monjalon.net>,
"David Marchand" <david.marchand@redhat.com>,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Subject: [PATCH] dispatcher: add cache guard to per-lcore struct
Date: Tue, 20 Feb 2024 09:35:04 +0100 [thread overview]
Message-ID: <20240220083504.488208-1-mattias.ronnblom@ericsson.com> (raw)
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
next reply other threads:[~2024-02-20 8:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 8:35 Mattias Rönnblom [this message]
2024-02-20 8:46 ` Morten Brørup
2024-02-22 6:59 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240220083504.488208-1-mattias.ronnblom@ericsson.com \
--to=mattias.ronnblom@ericsson.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=hofors@lysator.liu.se \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).