Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2580257imm; Thu, 11 Oct 2018 12:34:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV62gskIaCWPwQoLja79xySWwEdUOkfXnHb+m99Y7jAeyLl5YXKfHCW3APNzN97ifHFGP1js/ X-Received: by 2002:a63:d256:: with SMTP id t22-v6mr2541747pgi.335.1539286486926; Thu, 11 Oct 2018 12:34:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539286486; cv=none; d=google.com; s=arc-20160816; b=NCdoL31qStQmCmuNUEh3ovAFlDlTBRuFJERB/xpmdCiN57gkSPhKNh8gP+zstWTClE 6t5obSxzy/hATioGUd518zxDPfJ2WdUVC9etGCF9R096uTyD4NE8/lk95qasv++1eW0B vEPBNwRhfaw5REpd4Jl37unYNTk7qc94/US83ZstLnyI9swHLn6CXIyt4Si+p1WFu23l y0pjUQMsqQABo6O37P0UUB30lBkCSThIXtZ3ucIKb3SJeyD34FfwDJGYqFOPRDU2GhrY eODO8RZZt27b+P88rTNrRgbk6ck2VRUAjoYWv2cL7Bnd+w1Ke/XxhYDKQZgkKoXx8tXl hvjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=bLT2q5CwEHScJdfh1PtyO3N/B49SNOgT6nYZigpqXYo=; b=RZ3H8ncQkiWyCWrg0nw4ECRUoMzFzDzBFH556Ish+vf+29YZQXabqYSJuvr9TPHW98 ZZCBTIJBWew5Lybu5OnrfIqXsbWt5D3egi8MLxtFdS0fWCqM7XIFWrVn6Bqv2XByffhE soNtqdlPc/ehUz3nD5BCfUGZZIVRStvMtqjZed70cpkoM2oG2wno5fjnjI1yMempUC4u Y1scUgYeBzTIiA0PbZKlQghkU9tsx68vcxqWNxiU/CZimHgTgtTAdqzp6NfXnW0Y0k0t 4NykhwVAf6CzLl7iHji7HF6l6bMc8jkL7yV2wesYOO4cym/iHxP/VZ7kl0XoW5e8MGmu GJDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm2 header.b=oEDqX8+r; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=iTs6B7VH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10-v6si2909776plg.272.2018.10.11.12.34.31; Thu, 11 Oct 2018 12:34:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm2 header.b=oEDqX8+r; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=iTs6B7VH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728633AbeJLBQJ (ORCPT + 99 others); Thu, 11 Oct 2018 21:16:09 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:33239 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727693AbeJLBQJ (ORCPT ); Thu, 11 Oct 2018 21:16:09 -0400 X-Greylist: delayed 643 seconds by postgrey-1.27 at vger.kernel.org; Thu, 11 Oct 2018 21:16:08 EDT Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id B4D92CB7; Thu, 11 Oct 2018 13:37:11 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 11 Oct 2018 13:37:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=bLT2q5CwEHScJdfh1PtyO3N/B49 SNOgT6nYZigpqXYo=; b=oEDqX8+rgD6cy4lmm6DJAslUjWd5WKMe0ijfTy7yJUC 97vUb/angQHLOgQqzzf2uqEwoeUh/U0VpmIlAmKn3RMIpTFhrZ4xKcANgVjhi1UP 5gGC/D22Y1CiEfDXB6xM8am45CAw6aGSYXgkqfhjsX7rmeVi6b8o1c5Q67VfFTi9 UuWcvZJqp9WFf8Jce1FLwCpN5f1uE/tO8bkRpmxxC1CiUcDMw5UghOaDLGkeMWpA 4v3dCZBjA848+2O3jRCi+cyhpdCdRqjHPGyn3fVkrHNunpWb5UpfReKnYFwNDWXI wuIEkeog0/FnKHIRjvR+FhcFP6xVORJ8XsCPaD8wFWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=bLT2q5 CwEHScJdfh1PtyO3N/B49SNOgT6nYZigpqXYo=; b=iTs6B7VHDcWkYC8YQc2QSs Pyv30jfrwu027Rr0J3KsRlq/9sHhQmbTqBljBfHS2kMo+l5TVSM6eV3X0HbXwP4N EFdFiSEKn8CPC1OxS4rMjw/A6T6vdS9mojIa0Ag6OZ9iLWxjwQqgc6a2Q1KBEVit QqpCF6OYImQAWa1sFVFBUCSC7zLyDhRlyN3atvHfjU7ZuVRTjvlZbWehSvj184OI MHFkO0u4VGmxAVgUKVPjtYw5UavCaJ4iUjsv58Iunq52bhT/N6yg/1pSlWfU6S7x xh9rXEO2noaqg5SAlw+/YEBKG76ryCY68ZgYHMNqV+pBqpBhVS53QYLDxpoOniNA == X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 153C2102ED; Thu, 11 Oct 2018 13:37:09 -0400 (EDT) Date: Thu, 11 Oct 2018 10:37:07 -0700 From: Andres Freund To: "Michael S. Tsirkin" Cc: "H. Peter Anvin" , linux-kernel@vger.kernel.org, Linus Torvalds , Davidlohr Bueso , Peter Zijlstra , Ingo Molnar , Thomas Gleixner , "Paul E. McKenney" , the arch/x86 maintainers , Davidlohr Bueso , virtualization Subject: Re: [PATCH v2 0/3] x86: faster mb()+other barrier.h tweaks Message-ID: <20181011173707.26pekp65tlipvhdx@alap3.anarazel.de> References: <1452635935-5439-1-git-send-email-mst@redhat.com> <56957D54.5000602@zytor.com> <20160126101921-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160126101921-mutt-send-email-mst@redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2016-01-26 10:20:14 +0200, Michael S. Tsirkin wrote: > On Tue, Jan 12, 2016 at 02:25:24PM -0800, H. Peter Anvin wrote: > > On 01/12/16 14:10, Michael S. Tsirkin wrote: > > > mb() typically uses mfence on modern x86, but a micro-benchmark shows that it's > > > 2 to 3 times slower than lock; addl $0,(%%e/rsp) that we use on older CPUs. > > > > > > So let's use the locked variant everywhere - helps keep the code simple as > > > well. > > > > > > While I was at it, I found some inconsistencies in comments in > > > arch/x86/include/asm/barrier.h > > > > > > I hope I'm not splitting this up too much - the reason is I wanted to isolate > > > the code changes (that people might want to test for performance) from comment > > > changes approved by Linus, from (so far unreviewed) comment change I came up > > > with myself. > > > > > > Lightly tested on my system. > > > > > > Michael S. Tsirkin (3): > > > x86: drop mfence in favor of lock+addl > > > x86: drop a comment left over from X86_OOSTORE > > > x86: tweak the comment about use of wmb for IO > > > > > > > I would like to get feedback from the hardware team about the > > implications of this change, first. > Any luck getting some feedback on this one? Ping? I just saw a bunch of kernel fences in a benchmark, making me wonder why linux uses mfence rather than lock addl. Leading me to this thread. Greetings, Andres Freund