[dpdk-dev] [PATCH v3 2/2] eal/x86: Use lock-prefixed instructions to reduce cost of rte_smp_mb()

Stephen Hemminger stephen at networkplumber.org
Tue Jan 30 20:33:16 CET 2018


On Mon, 29 Jan 2018 16:47:45 +0100
Thomas Monjalon <thomas at monjalon.net> wrote:

> 15/01/2018 16:09, Konstantin Ananyev:
> > On x86 it  is possible to use lock-prefixed instructions to get
> > the similar effect as mfence.
> > As pointed by Java guys, on most modern HW that gives a better
> > performance than using mfence:
> > https://shipilev.net/blog/2014/on-the-fence-with-dependencies/
> > That patch adopts that technique for rte_smp_mb() implementation.
> > On BDW 2.2 mb_autotest on single lcore reports 2X cycle reduction,
> > i.e. from ~110 to ~55 cycles per operation.
> > 
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev at intel.com>
> > Acked-by: Bruce Richardson <bruce.richardson at intel.com>  
> 
> Applied, thanks

Does this change since lfence is one of the ways to block Spectre variant.


More information about the dev mailing list