Received: by 10.213.65.68 with SMTP id h4csp4413828imn; Tue, 10 Apr 2018 14:39:10 -0700 (PDT) X-Google-Smtp-Source: AIpwx49wmdwTFBJxUxQwV1yIpTQME26wmHgk6rJmoifpVB1TVh0KNh42Ekle7dIceW29Xzb6YCCC X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr2169162pla.150.1523396350518; Tue, 10 Apr 2018 14:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523396350; cv=none; d=google.com; s=arc-20160816; b=mu2q0sOb2Cu3LzXwBO/OtMqhx9WahOkgTXhAJK9zxZMrjgflD0T0wpMVtX4Az/quFH up9IkDV/8XXYCkC1T0jQoBAw5qrarnN0+fyf0ir00dcvcFFeChbGKpDDqXATRlbY20bh FxQaSwFyVNDGysOSAlHVTpe2nvR5vndaQ6NbQBTutNwAeVWlEb/O7y+2xcQRij8PoygB ORenWDDNbAZsghwPvrXmiSRP4Tj64CV/Do4Gj3XYwt7tpVWYFpP+AzzYMQorkbCZP5mx 2cwTHtujAWo7AHb9RDkicvYxJJ+fJI1ml/i8vB+/9uyY0hfXMXLwvU0vEeTuj/n0d7t7 yvCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=TdYJ5XdNXPhR38lfv51hO013qFd3YoCoEMAU45Ds1FA=; b=tJdR6ykyXLawd0+x5n9+75PEDqFVJcmwoBoR/oycl/4bqFVyvYEXT5uOj5Un7gJNrb ZIAju4R6fAb2DO18Z2fKFuzet6LxFyXvd2NoMhGUZUwApQv7Ham2X+Rp3gHEe8xEX7y+ gwLOU7j0vQKa8wxRMO55IBJ7gCoTD6iMqUaShnWA6W3zR11WUltCMCdlcvGmeYviXnla pDQ75jtJHiZcABNJ0jSgh18yfxm7dStcIx35qmjV3Tkkxyibimil20oVXar83Vkog+k1 YNmPYHvN6mHG/EQ+SzwW1uozeiXxMWXS5DqzdQGKW5APxE0eMw514quCyMIcTKsG75KP YUhA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j61-v6si3527949plb.317.2018.04.10.14.38.28; Tue, 10 Apr 2018 14:39:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677AbeDJVdj (ORCPT + 99 others); Tue, 10 Apr 2018 17:33:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:54830 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752286AbeDJVdh (ORCPT ); Tue, 10 Apr 2018 17:33:37 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3ALT2Be019861 for ; Tue, 10 Apr 2018 17:33:36 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2h90rekr16-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 10 Apr 2018 17:33:36 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Apr 2018 17:33:35 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 10 Apr 2018 17:33:31 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3ALXVmm49021016; Tue, 10 Apr 2018 21:33:31 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 077BFB2058; Tue, 10 Apr 2018 18:35:37 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id A8A45B2050; Tue, 10 Apr 2018 18:35:36 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id BEBE316C6DD8; Tue, 10 Apr 2018 14:34:34 -0700 (PDT) Date: Tue, 10 Apr 2018 14:34:34 -0700 From: "Paul E. McKenney" To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa Subject: Re: [PATCH] memory-model: fix cheat sheet typo Reply-To: paulmck@linux.vnet.ibm.com References: <1523292618-10207-1-git-send-email-pbonzini@redhat.com> <20180409184258.GP3948@linux.vnet.ibm.com> <20180410203214.GA19606@linux.vnet.ibm.com> <8cbda122-6aa3-365b-fd09-52dca0644cbd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cbda122-6aa3-365b-fd09-52dca0644cbd@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18041021-0052-0000-0000-000002D85236 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008833; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000256; SDB=6.01016033; UDB=6.00518110; IPR=6.00795284; MB=3.00020508; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-10 21:33:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041021-0053-0000-0000-00005C48903B Message-Id: <20180410213434.GC3948@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-10_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804100198 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 10, 2018 at 11:10:06PM +0200, Paolo Bonzini wrote: > On 10/04/2018 22:32, Paul E. McKenney wrote: > > On Mon, Apr 09, 2018 at 11:42:58AM -0700, Paul E. McKenney wrote: > >> On Mon, Apr 09, 2018 at 06:50:15PM +0200, Paolo Bonzini wrote: > >>> "RWM" should be "RMW", and that's more or less the extent to which I > >>> can claim to change the document. :) In particular, "Self" is not > >>> documented and the difference between "Self" and "SV" is not clear > >>> to me. > >>> > >>> Signed-off-by: Paolo Bonzini > >> > >> Applied, though without the questions. ;-) > >> > >> "Self" is for things like smp_load_acquire() and smp_store_release() > >> that order themselves against later and earlier accesses, respectively. > >> This ordering applies to later/earlier access to all variables, not > >> just the one that smp_load_acquire()/smp_store_release() accessed. > >> In contrast, things like smp_mb() order only other accesses, not > >> themselves. Or at least it is impossible to proves whether or not they > >> order themselves because they are not separately visible to other CPUs. > >> > >> "SV" is "same variable", which applies to pretty much anything that > >> accesses a variable, but not to things like smp_mb() which do not. > >> > >> Does that help? > > > > On the perhaps naive assumption that silence means assent, how about > > the following patch? > > Silence meant "I tried thinking of a patch myself, and hadn't come up > yet with a fully satisfactory one"; that's some kind of assent I guess. :) ;-) ;-) ;-) > Your patch is certainly an improvement! Glad it helps, and I have queued it for the next merge window. Of course, if a further improvement comes to mind, please do not keep it a secret. ;-) Thanx, Paul > Thanks, > > Paolo > > > Thanx, Paul > > > > ------------------------------------------------------------------------ > > > > commit 818e46e8db6cacb099b8640b7f2945a3151c00ab > > Author: Paul E. McKenney > > Date: Tue Apr 10 13:24:19 2018 -0700 > > > > tools/memory-order: Improve key for SELF and SV > > > > The key for "SELF" was missing completely and the key for "SV" was > > a bit obtuse. This commit therefore adds a key for "SELF" and improves > > the one for "SV". > > > > Reported-by: Paolo Bonzini > > Signed-off-by: Paul E. McKenney > > > > diff --git a/tools/memory-model/Documentation/cheatsheet.txt b/tools/memory-model/Documentation/cheatsheet.txt > > index c0eafdaddfa4..d502993ac7d2 100644 > > --- a/tools/memory-model/Documentation/cheatsheet.txt > > +++ b/tools/memory-model/Documentation/cheatsheet.txt > > @@ -26,4 +26,5 @@ Key: C: Ordering is cumulative > > DR: Dependent read (address dependency) > > DW: Dependent write (address, data, or control dependency) > > RMW: Atomic read-modify-write operation > > - SV Same-variable access > > + SELF: Orders self, as opposed to accesses both before and after > > + SV: Orders later accesses to the same variable > > >