Received: by 10.192.165.156 with SMTP id m28csp49151imm; Wed, 18 Apr 2018 17:07:04 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+0CQpe87IvaIUINGOu7qdDMqqy4/y5p1beDz3PIvxuHqq3IEWGI3j4smrnn8Mwz4a3zsj X-Received: by 10.101.88.11 with SMTP id g11mr3240806pgr.201.1524096424916; Wed, 18 Apr 2018 17:07:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524096424; cv=none; d=google.com; s=arc-20160816; b=Zm//wE9yIZVjGtiMtddz2fBPIMJa7kplW7+IcShzoqS/VMDu7jPJdcuxntrxKamZO5 VDA9s/znqvVnisqJ1CG0echmTXTLWhi6/uXwLFL//3GFN/QqXQmeEPhhcdkV24xcegKU BArE/jUkyUvSlDJAXbjbi98HfwwOEN2HVmgBrEs2kPk/qWgrMuXLS/RADq4wQwXpAzqt HPRJxiUjdicczRH+jB0/JxjU+auEvDI0GsjM00LQtoegeh3ODVFcqjOCFYbW0z7TiUb0 fbGmjT4FvqJKiHj/sPzmZydv+WszzLgdlU9hi65fpPfY+hhyaJyMKsBwwBYRyg+z3jOM hxOw== 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=0C6l9zR1+k4Ik31xF1Pf6OkMA3egOw93huIfKvWXX2U=; b=eyAS6G2Dio1MA0Rlp1hAAbonyxiXaNdfAoEmY2nSiCgK1KMLlRjJtSStZs67ZplQhe fz6JG+uGkqOFqkeGeoZhv329x6+3pffUYp9DGJ1WPZH7r5slhsDveXOxHsktHCc8a7km Y+e7P06kZcyOoiRgDCKrM6BffQnWRAFGmRh0WalbcLOaDV91y+I7DZ03TKSZmVJXxNk/ CDY/f8VIwpyu5oNfqDga7D1PLpqKbojQRSPI2odfm5qXi4MlauO1DTlsVcAPK0njauU1 1lwfIBlzS7q1hXaZoy9Ct3JtXQ6Y/N0WBMunIgjTWMCPdKUOhEZLQkp3QTcOyZWvDgxb FXxA== 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 n12si1913196pgf.497.2018.04.18.17.06.50; Wed, 18 Apr 2018 17:07:04 -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 S1752810AbeDSAF3 (ORCPT + 99 others); Wed, 18 Apr 2018 20:05:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52814 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752291AbeDSAF2 (ORCPT ); Wed, 18 Apr 2018 20:05:28 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3J022bc027921 for ; Wed, 18 Apr 2018 20:05:27 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hefdwht00-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 18 Apr 2018 20:05:27 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Apr 2018 20:05:26 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Apr 2018 20:05:21 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3J05LjS57540632; Thu, 19 Apr 2018 00:05:21 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 05325B2046; Wed, 18 Apr 2018 21:07:25 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.108]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id CB276B2050; Wed, 18 Apr 2018 21:07:24 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id F02CA16C9077; Wed, 18 Apr 2018 17:06:30 -0700 (PDT) Date: Wed, 18 Apr 2018 17:06:30 -0700 From: "Paul E. McKenney" To: Andrea Parri Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, mingo@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, akiyks@gmail.com Subject: Re: [PATCH RFC tools/memory-model 2/5] tools/memory-model: Add litmus test for multicopy atomicity Reply-To: paulmck@linux.vnet.ibm.com References: <20180416162228.GA18167@linux.vnet.ibm.com> <1523895771-19224-2-git-send-email-paulmck@linux.vnet.ibm.com> <20180418094033.GA3409@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418094033.GA3409@andrea> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18041900-0024-0000-0000-0000034ACD70 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008879; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01019919; UDB=6.00520363; IPR=6.00799160; MB=3.00020650; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-19 00:05:25 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041900-0025-0000-0000-000047B7A223 Message-Id: <20180419000630.GX26088@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-18_06:,, 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=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804180213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 11:40:33AM +0200, Andrea Parri wrote: > On Mon, Apr 16, 2018 at 09:22:48AM -0700, Paul E. McKenney wrote: > > This commit adds a litmus test suggested by Alan Stern that is forbidden > > on multicopy atomic systems, but allowed on non-multicopy atomic systems. > > Note that other-multicopy atomic systems are examples of non-multicopy > > atomic systems. > > > > Suggested-by: Alan Stern > > Signed-off-by: Paul E. McKenney > > --- > > .../litmus-tests/SB+poonceoncescoh.litmus | 31 ++++++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > create mode 100644 tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus > > We seem to be missing an entry in litmus-tests/README... We are, and I will add one once ... > > diff --git a/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus b/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus > > new file mode 100644 > > index 000000000000..991a2d6dec63 > > --- /dev/null > > +++ b/tools/memory-model/litmus-tests/SB+poonceoncescoh.litmus > > @@ -0,0 +1,31 @@ > > +C SB+poonceoncescoh > > + > > +(* > > + * Result: Sometimes > > + * > > + * This litmus test demonstrates that LKMM is not multicopy atomic. > > + *) > > + > > +{} > > + > > +P0(int *x, int *y) > > +{ > > + int r1; > > + int r2; > > + > > + WRITE_ONCE(*x, 1); > > + r1 = READ_ONCE(*x); > > + r2 = READ_ONCE(*y); > > +} > > + > > +P1(int *x, int *y) > > +{ > > + int r3; > > + int r4; > > + > > + WRITE_ONCE(*y, 1); > > + r3 = READ_ONCE(*y); > > + r4 = READ_ONCE(*x); > > +} > > + > > +exists (0:r2=0 /\ 1:r4=0 /\ 0:r1=1 /\ 1:r3=1) > > This test has a normalised name: why don't use that? ... we come to agreement on the documentation on how to produce a normalized name given a standard litmus test. Ditto for the tests whose names include the string "silsil", but those involve locking so might be considered lower priority. Thanx, Paul