[PATCH] eal: add cache guard to per-lcore PRNG state

Thomas Monjalon thomas at monjalon.net
Thu Oct 12 00:49:03 CEST 2023


11/10/2023 18:55, Morten Brørup:
> > From: Thomas Monjalon [mailto:thomas at monjalon.net]
> > Sent: Wednesday, 11 October 2023 18.08
> > 
> > TLS is an alternative solution proposed by Stephen.
> > What do you think?
> 
> I think we went down a rabbit hole - which I admit to enjoy. :-)

There is no reply/explanation in this thread.

> My simple patch should be applied, with the description improved by Mattias:
> 
> The per-lcore random state is frequently updated by their individual
> lcores, so add a cache guard to prevent false sharing in case the
> CPU employs a next-N-lines (or similar) hardware prefetcher.

OK applied




More information about the dev mailing list