Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1413265pxb; Fri, 6 Nov 2020 09:02:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJyToddv41xYogjePH62d0/HmJbwPde5XCzG7KkPPnsEdA1EoywU0CxgxDZd/R74hOPuR6/y X-Received: by 2002:aa7:c90a:: with SMTP id b10mr2925894edt.266.1604682154099; Fri, 06 Nov 2020 09:02:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604682154; cv=none; d=google.com; s=arc-20160816; b=fOE4QXqjwB4ChTk7MdQWTQZ5E7GguUsvt/wOsiIEpJ0zOhMD42zjeW/CmRupkzsNMD ed3juDEDFdgdBKjhpebVAnPtj0kzLU8MZ1dwIW3Th6X2ZUttg5qBL+aNcrOZVsAbvK09 yh0DlkoSKtkLRG00WgbhNW8LTc69i/f7fbOBYwNVrJjc4LFDFGM87jy30o7gFmPkb9Vb bcq9vhXPoereoti6B1ghiPHbjlLrVTCyahyyTwgjnDmE0FlcK9c1WcAI3eXip2jCkmCx Ampts3qIErnXEYeGtbOW+p7HHngtSsEf45VOoMKinRSlLwcMF+Quj3o/U2k3Ql3za9s6 Xe3g== 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=r77Bs7zS4X+92718k4jSMR7RNC9TTznMiy/lqGBbmmk=; b=PyKFss+Hr/wGOtWreDi4TAr5yZMRVcSyM/aEkuuJ+OecidtrSUm+zvAvqqKrn7FJvZ Uix2lCsm5zHkgyq0a2uYl/r3zz0lIkCISAdF/M8i4Gc5A3aPQkXKXRE6467G7iVrLQay g3JPfc+tJBwGwZqiT655f4dGcdMnP0k+nQ4N1XdM+AO+eMqm4OTB3cCpqcVGbE5n3O9H Kwl6gRGRBihudpz/pduDrEkD38hF5cXgG6w3eGYvUBej6d/unNttya62E7JhAKraeiIC tffrDBLbRC3g41guuQZu5tUz5/vHzmxtN1Te8QCN1GjOBSjQuCNDZFVH8h0JNdnNSmvd u5iA== 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 21si1374369edx.390.2020.11.06.09.02.10; Fri, 06 Nov 2020 09:02:34 -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 S1726408AbgKFQ7v (ORCPT + 99 others); Fri, 6 Nov 2020 11:59:51 -0500 Received: from netrider.rowland.org ([192.131.102.5]:38749 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725868AbgKFQ7v (ORCPT ); Fri, 6 Nov 2020 11:59:51 -0500 Received: (qmail 47392 invoked by uid 1000); 6 Nov 2020 11:59:30 -0500 Date: Fri, 6 Nov 2020 11:59:30 -0500 From: Alan Stern To: paulmck@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, parri.andrea@gmail.com, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com Subject: Re: [PATCH memory-model 5/8] tools/memory-model: Add a glossary of LKMM terms Message-ID: <20201106165930.GC47039@rowland.harvard.edu> References: <20201105215953.GA15309@paulmck-ThinkPad-P72> <20201105220017.15410-5-paulmck@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201105220017.15410-5-paulmck@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 02:00:14PM -0800, paulmck@kernel.org wrote: > From: "Paul E. McKenney" > > Signed-off-by: Paul E. McKenney > --- > tools/memory-model/Documentation/glossary.txt | 155 ++++++++++++++++++++++++++ > 1 file changed, 155 insertions(+) > create mode 100644 tools/memory-model/Documentation/glossary.txt > > diff --git a/tools/memory-model/Documentation/glossary.txt b/tools/memory-model/Documentation/glossary.txt > new file mode 100644 > index 0000000..036fa28 > --- /dev/null > +++ b/tools/memory-model/Documentation/glossary.txt > @@ -0,0 +1,155 @@ > +This document contains brief definitions of LKMM-related terms. Like most > +glossaries, it is not intended to be read front to back (except perhaps > +as a way of confirming a diagnosis of OCD), but rather to be searched > +for specific terms. > + > + > +Address Dependency: When the address of a later memory access is computed > + based on the value returned by an earlier load, an "address > + dependency" extends from that load extending to the later access. > + Address dependencies are quite common in RCU read-side critical > + sections: > + > + 1 rcu_read_lock(); > + 2 p = rcu_dereference(gp); > + 3 do_something(p->a); > + 4 rcu_read_unlock(); > + > + In this case, because the address of "p->a" on line 3 is computed > + from the value returned by the rcu_dereference() on line 2, the > + address dependency extends from that rcu_dereference() to that > + "p->a". In rare cases, optimizing compilers can destroy address > + dependencies. Please see Documentation/RCU/rcu_dereference.txt > + for more information. > + > + See also "Control Dependency". There should also be an entry for "Data Dependency", linked from here and from Control Dependency. > +Marked Access: An access to a variable that uses an special function or > + macro such as "r1 = READ_ONCE()" or "smp_store_release(&a, 1)". How about "r1 = READ_ONCE(x)"? Alan