From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 2/2] eal/x86: Use lock-prefixed instructions to reduce cost of rte_smp_mb() Date: Tue, 30 Jan 2018 11:33:16 -0800 Message-ID: <20180130113316.146088f5@xeon-e3> References: <1516028680-2342-3-git-send-email-konstantin.ananyev@intel.com> <1516028971-3409-1-git-send-email-konstantin.ananyev@intel.com> <3552780.vzqTqTtnLr@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Konstantin Ananyev , dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by dpdk.org (Postfix) with ESMTP id 0E2DE1B6FC for ; Tue, 30 Jan 2018 20:33:20 +0100 (CET) Received: by mail-pf0-f195.google.com with SMTP id b25so10055858pfd.9 for ; Tue, 30 Jan 2018 11:33:19 -0800 (PST) In-Reply-To: <3552780.vzqTqTtnLr@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 29 Jan 2018 16:47:45 +0100 Thomas Monjalon 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 > > Acked-by: Bruce Richardson > > Applied, thanks Does this change since lfence is one of the ways to block Spectre variant.