Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1384624pxb; Thu, 4 Mar 2021 09:57:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAXYCn5o5nn+c+HFP+L8zdbrDR4pRXC8o7Y6DeHsOTo9sCmuQgKMK22NxHK7wnsM9b2gBV X-Received: by 2002:a17:907:da1:: with SMTP id go33mr5482301ejc.488.1614880641322; Thu, 04 Mar 2021 09:57:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614880641; cv=none; d=google.com; s=arc-20160816; b=a0xabJf4adFdi1cziLPCzP0yQChidhN34roih+6cZroWaAyR/OLImq28OS6o7C6XUV eu4fCPsRtdWlxy7M5wJ2632sA5QzQNHQWCk1InpOvi96hWB42RiTUH47HBUb8obWDW/K 6ZgwX+u1k0vp3blaNymMkjDounlD5w1BTYxZ0iud0l8rVxjUurmw8MhQjHP88SzqBD2n JTG740W2SEYW+EnbthzwlH+WOsbD/3otAWu4bnig35NePpoSV8V5o294KO4bE4+EGXvm hKi39XEmP8EJG9lTe955tVcyggHqTq93df4IGSwwH3Xl4GQYCim0C9kpjuZyf1Gy4PuU 3yyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=3ogjaSgFhbc7eFE3G6yJADN1zhfsdN3r9ujVvSAzlrM=; b=p99G/8t+BvEHx7xO0iEI/qFfo2Dzf+BIq017QRdp6MvrIc+DEjlyeO18kmlLPejr6i lJWl8JUdMrUKeIeeuSZm7KdyMug5Y3Ze+NK8cBIQKvfJdt1uLKdB1uTx1BzbVAhaUc7n uOPQpGfcyYRPZcy3G0LHDiolpzHwFeZUbTb3B0pBxkFZZu2K4xf9fo+4JVnqbYnh+MW6 0wfsYkvcnW0u5gdBsdeb+3TBb3uE4nIVbRqT+AgNdzhpDkn8Wt7Vsz0DZpNfMXwwcCyV iElCbIznzTrTxeYqx0JowspKTtR6wyPEP2b6LmDs5ECSWU+GVmNlsErwrPJNCOrILrNV 0Uzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g21si54358edu.536.2021.03.04.09.56.58; Thu, 04 Mar 2021 09:57:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235003AbhCDPgW (ORCPT + 99 others); Thu, 4 Mar 2021 10:36:22 -0500 Received: from netrider.rowland.org ([192.131.102.5]:50323 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S234685AbhCDPgF (ORCPT ); Thu, 4 Mar 2021 10:36:05 -0500 Received: (qmail 1613083 invoked by uid 1000); 4 Mar 2021 10:35:24 -0500 Date: Thu, 4 Mar 2021 10:35:24 -0500 From: Alan Stern To: "Paul E. McKenney" Cc: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , bpf , LKML , parri.andrea@gmail.com, Will Deacon , Peter Zijlstra , boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , "Karlsson, Magnus" Subject: Re: XDP socket rings, and LKMM litmus tests Message-ID: <20210304153524.GA1612307@rowland.harvard.edu> References: <20210302211446.GA1541641@rowland.harvard.edu> <20210302235019.GT2696@paulmck-ThinkPad-P72> <20210303171221.GA1574518@rowland.harvard.edu> <20210303174022.GD2696@paulmck-ThinkPad-P72> <20210303202246.GC1582185@rowland.harvard.edu> <20210303220348.GL2696@paulmck-ThinkPad-P72> <20210304032101.GB1594980@rowland.harvard.edu> <20210304050407.GN2696@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210304050407.GN2696@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 03, 2021 at 09:04:07PM -0800, Paul E. McKenney wrote: > On Wed, Mar 03, 2021 at 10:21:01PM -0500, Alan Stern wrote: > > On Wed, Mar 03, 2021 at 02:03:48PM -0800, Paul E. McKenney wrote: > > > On Wed, Mar 03, 2021 at 03:22:46PM -0500, Alan Stern wrote: > > > > > And I cannot immediately think of a situation where > > > > > this approach would break that would not result in a data race being > > > > > flagged. Or is this yet another failure of my imagination? > > > > > > > > By definition, an access to a local variable cannot participate in a > > > > data race because all such accesses are confined to a single thread. > > > > > > True, but its value might have come from a load from a shared variable. > > > > Then that load could have participated in a data race. But the store to > > the local variable cannot. > > Agreed. My thought was that if the ordering from the initial (non-local) > load mattered, then that initial load must have participated in a > data race. Is that true, or am I failing to perceive some corner case? Ordering can matter even when no data race is involved. Just think about how much of the memory model is concerned with ordering of marked accesses, which don't participate in data races unless there is a conflicting plain access somewhere. Alan