Received: by 10.223.185.116 with SMTP id b49csp2904614wrg; Mon, 12 Feb 2018 17:39:49 -0800 (PST) X-Google-Smtp-Source: AH8x226lnOyjH+8zYs8cZfWCY8QEvgSViBQnSDl4cdsAOKnch5dl5l1hucjukRiyXDHbLmh5+M/J X-Received: by 10.99.173.73 with SMTP id y9mr10587338pgo.432.1518485989747; Mon, 12 Feb 2018 17:39:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518485989; cv=none; d=google.com; s=arc-20160816; b=G3PTMMnziFga8Z3D12Bsi9PGIQm3jccmqPh3QLKTW8gbahPED2p22mbAEf2Z+QzMpZ gO5snXNYo35MybchLTww8F51u9M2A9wPwa6r03T9uwBFzzAWnljwOQq6YG5V0xI1LY7V 4P8c+wsQtnKx81MglvG39w73moSOV7CsNiasTcPDtiN0isweIaHTdaG65Wa8oJwqBXym C5A0IUo4JYdd/ZKPTT0t5fbTJC2d24b053YXeH0bfZqn/QeUmxJBxZtCTOnEHTLNUkcW PQcqxSgDo599Zcmv9jnMQw1QRNj3GoT5LJ1C9KuuiQSkgScD0NoALNiHH5WPdE3cXpmI 10gA== 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=hgw10ugQOHJVtFSQd0o5WDbjbe8Gvbzvp+hgQ5Wiazc=; b=bByyFu6I4sbuXFdSurROss3qiIVfM8AYTCwOrkiF68qMDp+NDpi/enf/y/h0w5RTb2 4noYZuWvEZNBOa9RwaSqKQd/JT4cskW7U07OTpVIVR1q/VlbMBH8aDF18EmBDxmjERlg ksz15GhT3vsMyxRSs3DsEsOIZ5JZkVl67ZWsHYYCFDyj2zL5FkbS/tLkqJhID35lHHiw K8bX0JJ0+y0RXq675eYmJ/txK/1ElcASnex9l/sjw4drHQTfi5AOOxO//XvZI5O/u7hP bT/UQ30KvRVqlCEhM5X9SourizT6/N4BFYxcZwMj6PRkgSmF0RTYM6xQOLC0fTstqQFk 6+vQ== 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 h1-v6si6558626plh.766.2018.02.12.17.39.34; Mon, 12 Feb 2018 17:39:49 -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; 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 S933280AbeBMBiB (ORCPT + 99 others); Mon, 12 Feb 2018 20:38:01 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58210 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933164AbeBMBh7 (ORCPT ); Mon, 12 Feb 2018 20:37:59 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1D1bxsS088013 for ; Mon, 12 Feb 2018 20:37:59 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g3khvw5bs-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 12 Feb 2018 20:37:58 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 12 Feb 2018 20:37:57 -0500 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 12 Feb 2018 20:37:53 -0500 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1D1brKU36306982; Tue, 13 Feb 2018 01:37:53 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 60FC0B204D; Mon, 12 Feb 2018 20:34:47 -0500 (EST) Received: from paulmck-ThinkPad-W541 (unknown [9.85.199.196]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 64DC3B2050; Mon, 12 Feb 2018 20:34:44 -0500 (EST) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 2C12616C3025; Mon, 12 Feb 2018 17:38:03 -0800 (PST) Date: Mon, 12 Feb 2018 17:38:03 -0800 From: "Paul E. McKenney" To: Ingo Molnar Cc: Akira Yokosawa , linux-kernel@vger.kernel.org, stern@rowland.harvard.edu, parri.andrea@gmail.com, 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, Patrick Bellasi Subject: Re: [PATCH v2] tools/memory-model: Make compat with herd7 7.47 ("-" -> "_") Reply-To: paulmck@linux.vnet.ibm.com References: <20180209141832.GA17505@linux.vnet.ibm.com> <20180210010703.GE3617@linux.vnet.ibm.com> <20180211115148.iylaqk3f53f2vgf4@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180211115148.iylaqk3f53f2vgf4@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18021301-0052-0000-0000-000002B43013 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008524; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000252; SDB=6.00988892; UDB=6.00502082; IPR=6.00768246; BA=6.00005825; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019523; XFM=3.00000015; UTC=2018-02-13 01:37:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18021301-0053-0000-0000-000053902FF4 Message-Id: <20180213013803.GI3617@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-12_10:,, 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-1802130016 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 11, 2018 at 12:51:48PM +0100, Ingo Molnar wrote: > > * Paul E. McKenney wrote: > > > On Sat, Feb 10, 2018 at 08:46:25AM +0900, Akira Yokosawa wrote: > > > >From 7c1f497a9a51e8db1a94c8a7ef0b74b235aaab88 Mon Sep 17 00:00:00 2001 > > > From: Akira Yokosawa > > > Date: Fri, 9 Feb 2018 04:51:05 -0800 > > > Subject: [PATCH v2] tools/memory-model: Make compat with herd7 7.47 ("-" -> "_") > > > > > > As of herd7 7.47, these '-'s are not permitted and end up in > > > errors such as: > > > > > > File "./linux-kernel.def", line 44, characters 29-30: > > > unexpected '-' (in macros) > > > > > > Partial revert of commit 2d5fba7782d6 ("linux-kernel*: Make RCU > > > identifiers match ASPLOS paper") in the repository at > > > https://github.com/aparri/memory-model can restore the compatibility > > > with herd7 7.47. > > > > > > Reported-by: Patrick Bellasi > > > Suggested-by: Andrea Parri > > > Signed-off-by: Akira Yokosawa > > > --- > > > Paul, > > > > > > FWIW, this is a squashed version relative to patch 07/10 in the RFC series. > > > > Thank you, Akira! > > > > I am going to hold off on this for a bit to see if we can instead get > > a new release of herd7, but if we can't. this might well be a very good > > way to go. > > I'm wondering: > > > > // RCU > > > -rcu_read_lock() { __fence{rcu-lock}; } > > > -rcu_read_unlock() { __fence{rcu-unlock};} > > > -synchronize_rcu() { __fence{sync-rcu}; } > > > -synchronize_rcu_expedited() { __fence{sync-rcu}; } > > > +rcu_read_lock() { __fence{rcu_lock}; } > > > +rcu_read_unlock() { __fence{rcu_unlock};} > > > +synchronize_rcu() { __fence{sync_rcu}; } > > > +synchronize_rcu_expedited() { __fence{sync_rcu}; } > > What's the point of using '-' instead of '_'? In a program language syntax > environment it's easy to confuse it with a '-' operator, and it also looks > slightly sloppy and inconsistent if we sometimes have '_' and sometimes '-'. > > If it used on purpose, to separate namespaces from kernel internal API names, > then that's rather obscure IMHO and then I'd rather suggest proper prefixes > instead. These lines are connecting Linux-kernel names to cat-language names. The cat language can be thought of as a set-based constraint language, which doesn't have subtraction (the closest analog being set difference, which is denoted by "\"). Cat-language code has used "-" as a word separator in names, and the model had previously had an odd mixture of "-" and "_". Hence, the switch to the cat-language convention. Of course, if underscore is strongly preferred, underscore does work, and it should be possible to move in that direction. Thanx, Paul