Received: by 10.223.176.5 with SMTP id f5csp662815wra; Fri, 9 Feb 2018 05:19:35 -0800 (PST) X-Google-Smtp-Source: AH8x226fz+tYiGR7122Q311Rhmm0BkM+IeD+J6CBe+hD3n3OAunl0HvjxU9Faw8mIGVE+rirh4an X-Received: by 10.98.152.208 with SMTP id d77mr2865181pfk.108.1518182375044; Fri, 09 Feb 2018 05:19:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518182375; cv=none; d=google.com; s=arc-20160816; b=nm4tx6djK4fDM+jFe5HZeadaav34s8w/f9nUBOYs+JeyoxAukJDwZcUfqqa2ejgzmr vJqwoYf5gTmBDgYQkOWTT5TNlw9JX+CbUZcrvWpKbik1gdbCK6DUDYI6m55WnjywahEC zBNrcVwC7A7gyun35WEIGo8MXmDgOSpnIX1BeefTN/UWva2HNgjltRqaSjCJIA5nkkGG ua5rqOTyHU0TGySU+ENbM0HihRwmqUj764bHb1/d7LveWTqfZJFJi4gkF1BcfDMkLJ+V h+Lxptm/6FFjxy54ko7u8dG7zDnGwWAjxkDKlDkD1JKR+JO4Hf+FgFUEyWHKQ2In9doG s6wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=uRo0gufFl1S9NcgqXkdy1M5eMYzv3v/JPE9+TKC5z3Q=; b=ZEvcV7sPmjqBjizHIyxJGuwMMQ/M9Xc24GizZThe1oPGhRBu5L4rYtsfoDFkM+vuo/ lBSFYcafZksfhs2DOEm1AaDQ0xqbSBGqIc71LdH32Q7JbU87uEOPwj6PH9uPWt5KqMuu hgW9LgzDsytdFLcXhrnSUFvKJd+wdl+navD+KAHRzr9fxFyth+Xorm3rcgWW7MduLUsQ /N6YR7Wm/Ii+hz/2ob9ij3MXXYp/Lv1Ip3nOgm/2jEOA0TV2zC5NnEMzt2117Ej11vcB A33bdmCSThz8gnreSnXCOGiniJ3J5Ltw+srmXUHEJ6JjBbckS4uEltWq968clrU0vRIe mTuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lm4PuLca; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s7-v6si1475199plp.57.2018.02.09.05.19.07; Fri, 09 Feb 2018 05:19:35 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=lm4PuLca; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751145AbeBINLc (ORCPT + 99 others); Fri, 9 Feb 2018 08:11:32 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:44798 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeBINLa (ORCPT ); Fri, 9 Feb 2018 08:11:30 -0500 Received: by mail-io0-f193.google.com with SMTP id z6so9549023iob.11; Fri, 09 Feb 2018 05:11:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uRo0gufFl1S9NcgqXkdy1M5eMYzv3v/JPE9+TKC5z3Q=; b=lm4PuLcaFdQEmCxBXfM8YMoeRIQk2hXU4TSAQBM1rXj9yiSyS0K+ruwm4Iag83BMUQ JTYwDt9N42/LTJD4Vu4L0qHaGiD8dk6g2MBZ3IJFdry6sxFleZBUeMhJmgRudPxJ3Rhi pOYsKiIi8T2DPtxlkQNUZBDIlFb13p1WoNUaTetg7kuySHS4AjTNpNT2GCJctLjnEDYR j/WKbm1bEFrJEl94yq3iVk9rm4DQy8L8TpoC1UKmRuTh8vO58DtKuBuuU3N80QvKZvp5 njRBbIvyQamcll5be1ORVE7z7piCw6r17EtANOR+3joYJwOUWP4YEve+v1TVf9lT9T+5 +xsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uRo0gufFl1S9NcgqXkdy1M5eMYzv3v/JPE9+TKC5z3Q=; b=GbRqZPAWQaKdKThhTrKDNKJgJHlFkTpBOIIe93GbN4hwqiUSESxjNzR2H7HmlQHPD+ BksOfIYj/DizWN4AqisWKXTx5WbYalCWWF3DcFkgrGNhRG4YWub/ZO/5fzH4blZJO5hT URxfXy/c5eiYGSGBHg9YM6IhoFN2MAuth7Wk3upFgsftqug+kHICPunqi1STE3vxILp9 4oY4GbAyGpC/TJd5xHoaJpHuFpFGOQP7TwKAtsl+LZuYob/BV9/j/4/n7mzwQltnK6iG 93oMEGmrHT6JuDpkLiqr07DLdV5ktW6+n3sDBqVK3D0Fq8lvOuljX4WZuWfp/YUW7Mz3 5NoA== X-Gm-Message-State: APf1xPAs4V2CP1Kv9BZhdELQNzOms4cmIWfIrlDI/nrLgW7TP2znLJqd zKYlp0qfsytgyRnbYzdpnK0= X-Received: by 10.107.131.12 with SMTP id f12mr3031114iod.102.1518181890008; Fri, 09 Feb 2018 05:11:30 -0800 (PST) Received: from [192.168.11.4] (KD106167171201.ppp-bb.dion.ne.jp. [106.167.171.201]) by smtp.gmail.com with ESMTPSA id v11sm3538826itf.6.2018.02.09.05.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Feb 2018 05:11:29 -0800 (PST) Subject: Re: [PATCH 1/2] Documentation/memory-barriers.txt: cross-reference "tools/memory-model/" To: Andrea Parri , "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, stern@rowland.harvard.edu, will.deacon@arm.com, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, corbet@lwn.net, Akira Yokosawa References: <20180203012103.GD3617@linux.vnet.ibm.com> <8b4db282-2705-ed96-cf23-b0cdf94bbac8@gmail.com> <20180204183708.GA10437@andrea> <20180209123100.GY3617@linux.vnet.ibm.com> <20180209125051.GA21678@andrea> From: Akira Yokosawa Message-ID: <4b6f1278-9c73-576a-2072-e49622c0a1ee@gmail.com> Date: Fri, 9 Feb 2018 22:11:24 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180209125051.GA21678@andrea> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/02/09 21:50, Andrea Parri wrote: > On Fri, Feb 09, 2018 at 04:31:00AM -0800, Paul E. McKenney wrote: >> On Sun, Feb 04, 2018 at 07:37:08PM +0100, Andrea Parri wrote: >>> Hi Akira, >>> >>> On Mon, Feb 05, 2018 at 01:14:10AM +0900, Akira Yokosawa wrote: >>>> Hi Paul, >>>> CC: Andrea >>>> >>>> This is intentionally off the list, as I was not cc'd in the thread. >>>> If you think it is worthwhile, could you help me join the thread by >>>> forwarding the following part as a reply to your message, plus CC: to me. >>> >>> [CCing lists and other people] >>> >>> >>>> >>>> On Fri, Feb 02, 2018 at 17:21:03AM -0800, Paul E. McKenney wrote: >>>>> On Fri, Feb 02, 2018 at 10:12:48AM +0100, Andrea Parri wrote: >>>>>> Recent efforts led to the specification of a memory consistency model >>>>>> for the Linux kernel [1], which "can (roughly speaking) be thought of >>>>>> as an automated version of memory-barriers.txt" and which is (in turn) >>>>>> "accompanied by extensive documentation on its use and its design". >>>>>> >>>>>> Make sure that the (occasional) reader of memory-barriers.txt will be >>>>>> aware of these developments. >>>>>> >>>>>> [1] https://marc.info/?l=linux-kernel&m=151687290114799&w=2 >>>>>> >>>>>> Signed-off-by: Andrea Parri >>>>> >>>>> I am inclined to pull in something along these lines, but would like >>>>> some feedback on the wording, especially how "official" we want to >>>>> make the memory model to be. >>>>> >>>>> Thoughts? >>>> >>>> The change log of commit e7720af5f9ac ("locking/Documentation: Add disclaimer") says: >>>> >>>> It appears people are reading this document as a requirements list for >>>> building hardware. This is not the intent of this document. Nor is it >>>> particularly suited for this purpose. >>>> >>>> The primary purpose of this document is our collective attempt to define >>>> a set of primitives that (hopefully) allow us to write correct code on >>>> the myriad of SMP platforms Linux supports. >>>> >>>> Its a definite work in progress as our understanding of these platforms, >>>> and memory ordering in general, progresses. >>>> >>>> Nor does being mentioned in this document mean we think its a >>>> particularly good idea; the data dependency barrier required by Alpha >>>> being a prime example. Yes we have it, no you're insane to require it >>>> when building new hardware. >>>> >>>> My take on the Linux Kernel memory-consistency model is a supplement of >>>> memory-barriers.txt and the disclaimer also applies to the memory model. >>>> >>>>> >>>>> If I don't hear otherwise in a couple of days, I will pull this as is. >>>>> >>>>> Thanx, Paul >>>>> >>>>>> --- >>>>>> Documentation/memory-barriers.txt | 4 +++- >>>>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt >>>>>> index a863009849a3b..8cc3f098f4a7d 100644 >>>>>> --- a/Documentation/memory-barriers.txt >>>>>> +++ b/Documentation/memory-barriers.txt >>>>>> @@ -17,7 +17,9 @@ meant as a guide to using the various memory barriers provided by Linux, but >>>>>> in case of any doubt (and there are many) please ask. >>>>>> >>>>>> To repeat, this document is not a specification of what Linux expects from >>>>>> -hardware. >>>>>> +hardware. For such a specification, in the form of a memory consistency >>>>>> +model, and for documentation about its usage and its design, the reader is >>>>>> +referred to "tools/memory-model/". >>>>>> >>>> >>>> Adding cross-reference in this way can _weaken_ the message of the disclaimer. >>> >>> Thank you for your remarks; I do share the same concern. >>> >>>> What about adding it in the previous sentence as the patch appended bellow? >>> >>> I do like this idea: I believe that my phrasing (and that "what Linux >>> expects from hardware") may be easily subject to misinterpretation... >>> which your solution can avoid. >> >> Any objections to Akira's patch below? (Give or take the usual >> wordsmithing.) >> >> Andrea, should I interpret your paragraph above ask an Acked-by? > > Well, I am among the Signed-off-by: of the patch; it didn't seem too fair > to me to Ack my own patch... ;-) Is the wording sound? other suggestions? > > Andrea Well, I should have kept the author of the patch. I.e. I guess the author should have been From: Andrea Parri ??? If you'd like, I can respin the patch. Thanks, Akira > > >> >> Thanx, Paul >> >>> Andrea >>> >>> >>>> >>>> The tag use in the change log may need adjustments. I'm not familiar with the >>>> manner in modifying other persons' patches. Of course, the wording itself can >>>> be improved further. Any feedback is welcome. >>>> >>>> Thanks, Akira >>>> >>>>>> The purpose of this document is twofold: >>>>>> >>>>>> -- >>>>>> 2.7.4 >>>>>> >>>> >>>> ----8<------- >>>> From 714e8c4b09acd6e965de116532dce05070b9e636 Mon Sep 17 00:00:00 2001 >>>> From: Akira Yokosawa >>>> Date: Mon, 5 Feb 2018 00:28:36 +0900 >>>> Subject: [PATCH] Documentation/memory-barriers.txt: cross-reference "tools/memory-model/" >>>> >>>> Recent efforts led to the specification of a memory consistency model >>>> for the Linux kernel [1], which "can (roughly speaking) be thought of >>>> as an automated version of memory-barriers.txt" and which is (in turn) >>>> "accompanied by extensive documentation on its use and its design". >>>> >>>> Make sure that the (occasional) reader of memory-barriers.txt will be >>>> aware of these developments. >>>> >>>> [1] https://marc.info/?l=linux-kernel&m=151687290114799&w=2 >>>> >>>> Signed-off-by: Andrea Parri >>>> Signed-off-by: Akira Yokosawa >>>> --- >>>> Documentation/memory-barriers.txt | 4 +++- >>>> 1 file changed, 3 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt >>>> index 479ecec..975488d 100644 >>>> --- a/Documentation/memory-barriers.txt >>>> +++ b/Documentation/memory-barriers.txt >>>> @@ -14,7 +14,9 @@ DISCLAIMER >>>> This document is not a specification; it is intentionally (for the sake of >>>> brevity) and unintentionally (due to being human) incomplete. This document is >>>> meant as a guide to using the various memory barriers provided by Linux, but >>>> -in case of any doubt (and there are many) please ask. >>>> +in case of any doubt (and there are many) please ask. For clarification of such >>>> +doubt, in the form of a memory consistency model, and for documentation about >>>> +its usage and its design, the reader is referred to "tools/memory-model/". >>>> >>>> To repeat, this document is not a specification of what Linux expects from >>>> hardware. >>>> -- >>>> 2.7.4 >>>> >>>> >>>> >>> >>