Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1222150yba; Thu, 18 Apr 2019 17:54:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBuPoKJE5laKhBwv2V9ynaQ5CRg/HSW1UakBC7vx1x0/WAN6c/n2ziOGv6snMHakyqC8F6 X-Received: by 2002:a65:625a:: with SMTP id q26mr1083422pgv.68.1555635270126; Thu, 18 Apr 2019 17:54:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555635270; cv=none; d=google.com; s=arc-20160816; b=bzgrZ740RPsDa8f5P4lh0ut3+INK5j88qjKDnfXfJSGZJkZBDRFpLmAtCJ3fCYnpCE SZwUfczNf23KyWBXgadEOCzEpevTZROCniqzuqGLZUOy4rUKkMdVr9SWzeHJ0ufrQKmN 2qlZDF0rrzcyqQq7linGg0Ww70QhfRc9wb9cNcEAZNNnNjK0VNsPjTDE0Spr4zzSOrRM 7EOJHyssJNj0WiJ2jcxZIDv3a14uifTSi9J3sj9zEh6ymhvBxE3n9sYzbGMS9Dw51POu HKUvaHu8RYBQRVpINeRohmgSOzP9SdA2ex6h0vy7nnxjkndNoEw7ObQZXmzpRgk02Kdn M18w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=reMWGe81hoF/vvuKJ+4JQR1H9FwkqoUMbxtyhkxE3S0=; b=EG5rCfaxaO9kaTvhJB+d39vEb1FflVmP2znH8rr3t3fF3DZk8RvP6Q7oZQ2+tCbWNu wmt9Ynrtc575z/HJiynzKC7bLymEtvfYLrtM/Wqf8k1YIG2kmTAyHqgPLyPkbfOBCEYA dhVrZQvW5pt/nmwbnDwYUpu2DtnDdjqRrjQB2BnfglDzvsR9Y1AyXIZPt9tFiMqE5Upb I0ngpEvbom/qPt9V7PwAx6eFO208BTSGFXpZFfA2cOHW1ucrAbfsxM+eXocctera7WMG GHjIoLWrQcvcig4V9AQljtdvFBP3nNXqq6oOJ9qiffg78wUPV2D+T4BYP4j8TRozn09Q zLCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FEukazJt; 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 w7si3519478plp.341.2019.04.18.17.54.11; Thu, 18 Apr 2019 17:54:30 -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=@amarulasolutions.com header.s=google header.b=FEukazJt; 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 S1726874AbfDSAxN (ORCPT + 99 others); Thu, 18 Apr 2019 20:53:13 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:35494 "EHLO mail-wr1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbfDSAxN (ORCPT ); Thu, 18 Apr 2019 20:53:13 -0400 Received: by mail-wr1-f45.google.com with SMTP id o12so1778045wrn.2 for ; Thu, 18 Apr 2019 17:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=reMWGe81hoF/vvuKJ+4JQR1H9FwkqoUMbxtyhkxE3S0=; b=FEukazJtq1ezJQKm8043WwgrXJchb8r533cJT8INdSG5rUbIp/iRWsJeFXsNdWcRDb +5xjj7QpGOzCZxHXP/1NFI7DyTFKWvKif1Lz7ri51ZLlYN4pgYLBKSf0nVw230qrXuvw /PcVVkv2HER6X81+bj8lTkLhKbYxo2UiAWkOw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=reMWGe81hoF/vvuKJ+4JQR1H9FwkqoUMbxtyhkxE3S0=; b=I0aiXLs2a4NBS14IkJBiX7WzmhNcHFZUCPSLJMnUWbGE/NBbtXMQk+1Zf2jYOn3wTC tLKdlQtrEp8+5K+w3r2eCzbPKFR8Pw/K3uDa9lkUseA7o2Bm2AM8ROMtL4FXVm4ygSMR aq1Za4V3nCXwBxeTThBYIurgUbg7xbXb8pbLKzfLsy77f36BHmHkhqnWlgdxN/EIc+ux 6e7BY3bxQ/IOEADML1lnNXWSU17PlohrvaL+U5xW7A8YMVzZ1rYXFEUz3fgw3BFBTord lmM+9hWU4Nyjj6DjNy227rz7G8MMNk040MTzkQzXIJelcCFXbujsjk+Gx9jgY2mzLh43 ZWQA== X-Gm-Message-State: APjAAAXpIaNUZxv3zvo7/qHC67nqhfb0+p11Rb+ANxSepwSC8OctG+97 WemlRQTXVWJ34INOSUVMt9HBbA== X-Received: by 2002:a5d:5712:: with SMTP id a18mr669268wrv.219.1555635191545; Thu, 18 Apr 2019 17:53:11 -0700 (PDT) Received: from andrea ([89.22.71.151]) by smtp.gmail.com with ESMTPSA id v190sm4259614wme.18.2019.04.18.17.53.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 17:53:10 -0700 (PDT) Date: Fri, 19 Apr 2019 02:53:02 +0200 From: Andrea Parri To: Alan Stern Cc: "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Daniel Kroening , Kernel development list Subject: Re: Adding plain accesses and detecting data races in the LKMM Message-ID: <20190419005302.GA5311@andrea> References: <20190418125412.GA10817@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Are you saying that on x86, atomic_inc() acts as a full memory barrier > but not as a compiler barrier, and vice versa for > smp_mb__after_atomic()? Or that neither atomic_inc() nor > smp_mb__after_atomic() implements a full memory barrier? I'd say the former; AFAICT, these boil down to: https://elixir.bootlin.com/linux/v5.1-rc5/source/arch/x86/include/asm/atomic.h#L95 https://elixir.bootlin.com/linux/v5.1-rc5/source/arch/x86/include/asm/barrier.h#L84 Andrea