From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: "Morten Brørup" <mb@smartsharesystems.com>,
thomas@monjalon.net, david.marchand@redhat.com,
mattias.ronnblom@ericsson.com, bruce.richardson@intel.com
Cc: olivier.matz@6wind.com, andrew.rybchenko@oktetlabs.ru,
honnappa.nagarahalli@arm.com, konstantin.v.ananyev@yandex.ru,
dev@dpdk.org
Subject: Re: [PATCH] eal: add cache guard to per-lcore PRNG state
Date: Mon, 4 Sep 2023 13:57:19 +0200 [thread overview]
Message-ID: <86202387-4424-e4d8-64df-531a580bebd4@lysator.liu.se> (raw)
In-Reply-To: <20230904092632.12675-1-mb@smartsharesystems.com>
On 2023-09-04 11:26, Morten Brørup wrote:
> The per-lcore random state is frequently updated by their individual
> lcores, so add a cache guard to prevent CPU cache thrashing.
>
"to prevent false sharing in case the CPU employs a next-N-lines (or
similar) hardware prefetcher"
In my world, cache trashing and cache line contention are two different
things.
Other than that,
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> Depends-on: series-29415 ("clarify purpose of empty cache lines")
>
> Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
> ---
> lib/eal/common/rte_random.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/lib/eal/common/rte_random.c b/lib/eal/common/rte_random.c
> index 565f2401ce..3df0c7004a 100644
> --- a/lib/eal/common/rte_random.c
> +++ b/lib/eal/common/rte_random.c
> @@ -18,6 +18,7 @@ struct rte_rand_state {
> uint64_t z3;
> uint64_t z4;
> uint64_t z5;
> + RTE_CACHE_GUARD;
> } __rte_cache_aligned;
>
> /* One instance each for every lcore id-equipped thread, and one
next prev parent reply other threads:[~2023-09-04 11:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 9:26 Morten Brørup
2023-09-04 11:57 ` Mattias Rönnblom [this message]
2023-09-06 16:25 ` Stephen Hemminger
2023-10-11 16:07 ` Thomas Monjalon
2023-10-11 16:55 ` Morten Brørup
2023-10-11 22:49 ` Thomas Monjalon
2023-10-11 20:41 ` Mattias Rönnblom
2023-09-29 18:55 ` Morten Brørup
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=86202387-4424-e4d8-64df-531a580bebd4@lysator.liu.se \
--to=hofors@lysator.liu.se \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=konstantin.v.ananyev@yandex.ru \
--cc=mattias.ronnblom@ericsson.com \
--cc=mb@smartsharesystems.com \
--cc=olivier.matz@6wind.com \
--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).