Received: by 10.223.185.116 with SMTP id b49csp818523wrg; Fri, 16 Feb 2018 07:41:25 -0800 (PST) X-Google-Smtp-Source: AH8x226vgMjpyIAvXFt8QBCrS46XEb6n+PNGI9Lnfu3sJJGTYwRuNvrNsuHB0OTY9BmvnziAnU0F X-Received: by 10.101.81.141 with SMTP id h13mr5456881pgq.241.1518795685646; Fri, 16 Feb 2018 07:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518795685; cv=none; d=google.com; s=arc-20160816; b=jeqZKBiz6+LJxIJuSu/tx+JiRUSxgJc72pUo7p4WqqDA9RaEsIvDKOt6ZY8qpyvt7N vnb0arOjctd2K8SeATmvpKsNfeUfFid9tc7UCcD5hV+UVu4K32LROIS7a0i2BQvr8b0H EauDsfVTTRUuu8vbiE9VLhMhyeX6AdJXeDlB+9RlwcxuAcwI3RhfplYvDPlHYX9aHFcJ se0i5OL+zlpm0eBu4vLlzcBD7ASntd+Ao2uMN9e336PI7MPGwqr3UIGFqhCMdpBb0/7M b3BupIdgROVAZElH8rWTYcI+YA4+y1cLRIA8MWP4eJcazWdy3lhFJ8PF8xFpi+RfLNNz MX+Q== 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:arc-authentication-results; bh=XgPNYcGV2YqXi76/bK5v1fczcrHH3rvBaURPXMgoTJw=; b=oYtuCsvBlUH6GAJfrGwJw9/PJt4YCOLLyBycLU4ZiJuPyAAyqhNGfVmKGPWuprbkS5 tjeNNakXXNGp6yYveE1i03iCCm3fyuTEZMhM91zzVCHdghhTtRS5kNQ/IQuPlfE/fglu J8HmoBsdZbVad4Sn+jPTcX8+xt716i5kKiAqV43ZtmDdtx5HjrY6ntdWI9iECUgbZNVg fXbc18ml8aapLeIzGHtJkeM89u/IIcCiLZhemlZXev+Hlc1pgMY37SfsMt9Iuq74A6fj 1SILZGL27bNqDopbQc6aDwFeOQGHgjoaKYokpJXYiaIjWYSoyA4R/9qGoBYlqJNtfg1T e8xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MAzjGant; 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 g11si4139838pgo.717.2018.02.16.07.41.10; Fri, 16 Feb 2018 07:41:25 -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=MAzjGant; 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 S1164547AbeBOXUH (ORCPT + 99 others); Thu, 15 Feb 2018 18:20:07 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39093 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163785AbeBOXUG (ORCPT ); Thu, 15 Feb 2018 18:20:06 -0500 Received: by mail-wm0-f65.google.com with SMTP id b21so150128wme.4 for ; Thu, 15 Feb 2018 15:20:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XgPNYcGV2YqXi76/bK5v1fczcrHH3rvBaURPXMgoTJw=; b=MAzjGantMTqTJIpHG5xUmMaIltzBpYuPSvdjZhqNdiQeTrS8MUwA5E13tqEbPWiSds oI8zSil6lC5i8fSSw/0kf4V+PvBe2I6/722GRgHOB2SZIW0l4bk0dFw6ZcAejdc4szmF MV0AVrL1EOZQkRpJx45imYkI61Ql19sZTIPYwybdh7JAkcEUS+XNUMUQXlDh/kP6otgW jk/I3EYbHnsFzD0kzSYBdOZpXa/QnjCk9bKXwVvwrDxfgI9iZ99VuJWpSe5dksjbPYds R/wd8/Og+L6lFl0U0BsFfJCdjE+G3mlPYlq6ypiwmyo9hSGuHVbKFQPcNwKv4wlDP8TN QrIQ== 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=XgPNYcGV2YqXi76/bK5v1fczcrHH3rvBaURPXMgoTJw=; b=HW6eXlbODNxaW/GooxadjDBVSX5nkH85Re9ukdOHZDtsHRAwSgTP9ISro+8TCbmkR7 uQDdR1pGPCVHJmCvmB2OtyzwRjVsBaUGzaUGofWnq0MBiDs5G/F3nK1xJdA0O7NkV6HI TzI9hEhCM0IWZZf5FVhmY5reJfUNP743TAJfCgFabHJ3B98X3ldq9crZzb/XtQiMpllN m50K4CQcLCMnKPHlz9dKCPQNkPPeZrcEmm/bMo572trt6XsYP4sv1jmxJEoadQ/XkJPV Bplbd03mplPHunp02B+GQk7TzaSUgz9GO0tg/imDA+TrRPQNlFWQebrO6cL8hlAAhsbn LWNQ== X-Gm-Message-State: APf1xPBrrP/2vyWXPggV+GDeKIp76zSgZ/gDkB+qxNjAPvLOJUSp0NiS ggdJncA7l1OswEf9ZICR0APzvEED X-Received: by 10.28.191.147 with SMTP id o19mr438401wmi.130.1518736805046; Thu, 15 Feb 2018 15:20:05 -0800 (PST) Received: from andrea (dynamic-2a00-1028-8386-da8a-e035-bf19-070b-9348.ipv6.broadband.iol.cz. [2a00:1028:8386:da8a:e035:bf19:70b:9348]) by smtp.gmail.com with ESMTPSA id t14sm14863556wmc.23.2018.02.15.15.20.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 15:20:04 -0800 (PST) Date: Fri, 16 Feb 2018 00:19:58 +0100 From: Andrea Parri To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, mingo@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, akiyks@gmail.com Subject: Re: [PATCH RFC tip/lkmm 08/10] EXP Remove understore from smp_mb__before_atomic() workings Message-ID: <20180215231958.GA7422@andrea> References: <20180209141832.GA17505@linux.vnet.ibm.com> <1518186031-17997-8-git-send-email-paulmck@linux.vnet.ibm.com> <20180215223009.GA5460@andrea> <20180215224937.GD3617@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180215224937.GD3617@linux.vnet.ibm.com> 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 On Thu, Feb 15, 2018 at 02:49:37PM -0800, Paul E. McKenney wrote: > On Thu, Feb 15, 2018 at 11:30:09PM +0100, Andrea Parri wrote: > > On Fri, Feb 09, 2018 at 06:20:29AM -0800, Paul E. McKenney wrote: > > > Signed-off-by: Paul E. McKenney > > > > nit: s/understore/underscore (a very understandable lapsus, BTW ;-) > > ;-) > > Will fix when squashing. > > > According to the cover letter, patches 8-10 of this series are intended > > to be squashed together; it could be useful to add a description then: > > the motivation for these changes might appear "trivial" today; months/ > > years from now? mmh, I can't put my finger on it ;-) > > Assuming we keep these patches, agreed. Something like this for the > aggregated single commit, perhaps: > > tools/memory-model: Convert underscores to hyphens > > Typical cat-language code uses hyphens for word separators in > identifiers, but several LKMM identifiers use underscores instead. > This commit therefore converts the underscores in the .bell and > .cat files for smp_mb__before_atomic(), smp_mb__after_atomic(), > and smp_mb__after_spinlock() to hyphens. > > > IMO, this descrition should also mention why this solution "is the way > > to go" (e.g., compare with the solution recently implemented by Akira). > > You lost me here. Or are you asking for a commit log similar to that > provided by Akira for his forward-port of Alan's unrelated patch? If > so, please see above. I was mainly thinking "but rb_dep..."; or you're also planning to rename this annotation and, maybe, the "rb-dep" relation (in order to avoid the conflict)? Andrea > > Thanx, Paul > > > Andrea > > > > > > > --- > > > tools/memory-model/linux-kernel.bell | 2 +- > > > tools/memory-model/linux-kernel.cat | 2 +- > > > tools/memory-model/linux-kernel.def | 2 +- > > > 3 files changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linux-kernel.bell > > > index b984bbda01a5..558bbef9e08a 100644 > > > --- a/tools/memory-model/linux-kernel.bell > > > +++ b/tools/memory-model/linux-kernel.bell > > > @@ -28,7 +28,7 @@ enum Barriers = 'wmb (*smp_wmb*) || > > > 'rcu-lock (*rcu_read_lock*) || > > > 'rcu-unlock (*rcu_read_unlock*) || > > > 'sync-rcu (*synchronize_rcu*) || > > > - 'before_atomic (*smp_mb__before_atomic*) || > > > + 'before-atomic (*smp_mb__before_atomic*) || > > > 'after_atomic (*smp_mb__after_atomic*) || > > > 'after_spinlock (*smp_mb__after_spinlock*) > > > instructions F[Barriers] > > > diff --git a/tools/memory-model/linux-kernel.cat b/tools/memory-model/linux-kernel.cat > > > index babe2b3b0bb3..31c08a44c088 100644 > > > --- a/tools/memory-model/linux-kernel.cat > > > +++ b/tools/memory-model/linux-kernel.cat > > > @@ -29,7 +29,7 @@ let rb-dep = [R] ; fencerel(Rb_dep) ; [R] > > > let rmb = [R \ Noreturn] ; fencerel(Rmb) ; [R \ Noreturn] > > > let wmb = [W] ; fencerel(Wmb) ; [W] > > > let mb = ([M] ; fencerel(Mb) ; [M]) | > > > - ([M] ; fencerel(Before_atomic) ; [RMW] ; po? ; [M]) | > > > + ([M] ; fencerel(Before-atomic) ; [RMW] ; po? ; [M]) | > > > ([M] ; po? ; [RMW] ; fencerel(After_atomic) ; [M]) | > > > ([M] ; po? ; [LKW] ; fencerel(After_spinlock) ; [M]) > > > let gp = po ; [Sync-rcu] ; po? > > > diff --git a/tools/memory-model/linux-kernel.def b/tools/memory-model/linux-kernel.def > > > index a397387f77cc..ff4b756f4a44 100644 > > > --- a/tools/memory-model/linux-kernel.def > > > +++ b/tools/memory-model/linux-kernel.def > > > @@ -21,7 +21,7 @@ smp_mb() { __fence{mb} ; } > > > smp_rmb() { __fence{rmb} ; } > > > smp_wmb() { __fence{wmb} ; } > > > smp_read_barrier_depends() { __fence{rb_dep}; } > > > -smp_mb__before_atomic() { __fence{before_atomic} ; } > > > +smp_mb__before_atomic() { __fence{before-atomic} ; } > > > smp_mb__after_atomic() { __fence{after_atomic} ; } > > > smp_mb__after_spinlock() { __fence{after_spinlock} ; } > > > > > > -- > > > 2.5.2 > > > > > >