Received: by 10.192.165.156 with SMTP id m28csp1025865imm; Wed, 18 Apr 2018 02:42:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx487AVjci37XGCYAMmo2bipclmfgHCZG3DQ15l2Gi3U0akI+S7NuFsg4lvOfAtFFDqa+FJKS X-Received: by 10.99.178.12 with SMTP id x12mr1209053pge.316.1524044526669; Wed, 18 Apr 2018 02:42:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524044526; cv=none; d=google.com; s=arc-20160816; b=EWwbrTs3km9HQuH/rhazY2YEUhQ9ZuvMh/sovR9xajWFvhzHQ0zd/peZk6L0L/LbZW Z31wsRrvVNwiMf5+bbgZGPXDy6PuDg8T9TzK2MjgqEPnBqLLSfqUhEFwg6QREPi5Jg5Q 8nOSfrjK0In0Oq/1p2MKYWDG9rbkxF1G1/8PqRpFMR8kPNCoOg/3c5djRIZot52b+kIo TQ4kdVhuRDTfa41VFTQZnuOXNrezuvBIlNlmizXUnaKPrsMMbYda8dn1AoscdfLUSyhu +pM+pqnv/cPtkFdvKe6k8OYzPmbRdTHBCnxOhHCq+MwTOwKFWlZu403M4foBuDRNN+N/ NwVw== 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=a+mHOrY4G4Fnvx9jWjcbAbXoktOd96XCccTMzs1fxYI=; b=D8zNmDX8pijurdOmeKnBpoqsEypD6Y5GOuvaeHx4LsroAtgh5nMfrYhQPxLXcs8wT+ Ba6FaZxPTw6SUoKSiMTvMwR2rTv2UIsXE24UGlb5DAUOcBZAOAkfrMYlK+dedCn26Szw Y3Kr1TSphntN8K6u2yKAcxMaa+iKfUuJMyGZVJ8az77J+pZSoSoy9Zos5+HT/cv7PUC1 TGZOZ3yZ5ZUVYbiaAdY8344ituRI7Q02Sz18mEDwNOwwOhJUQwhIkuBzeUuGionuYd94 D0WWfVDp+2MddvUxN2zUgZ4jeoOQDHljQnew8z9IG7d565pRF1Ehg9EJG21QgAO8s7Gv 7mzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IcyJV0pA; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si733733pgv.591.2018.04.18.02.41.52; Wed, 18 Apr 2018 02:42:06 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IcyJV0pA; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbeDRJkn (ORCPT + 99 others); Wed, 18 Apr 2018 05:40:43 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39062 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751942AbeDRJkk (ORCPT ); Wed, 18 Apr 2018 05:40:40 -0400 Received: by mail-wr0-f193.google.com with SMTP id q6-v6so2971437wrd.6 for ; Wed, 18 Apr 2018 02:40:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=a+mHOrY4G4Fnvx9jWjcbAbXoktOd96XCccTMzs1fxYI=; b=IcyJV0pA156M6/nSKmiXZlg+4Srsy1N3dyCSTM0dABPlyHl9cABHDVAcGbOZSXSUEK +Xl9yzHRwmRyNhc9tITcIv3YA8VpSEnDQhu0L5JhNf5JdZjirlKcwVIVYhvunVObZwyx gB5YJkB3u+x4+gQf1LJosuKnQenkUvZUqHXMA= 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=a+mHOrY4G4Fnvx9jWjcbAbXoktOd96XCccTMzs1fxYI=; b=K1hdc6aV+S0UxG5hb4ALWKAMKf2JfpBj985kqYRYpni+THki/NLO7p4uL956vJX5Ky 7JYHzqXCuw/VEaU8Zo/U+NApsIhtA94iaSg77Gb+kNNFuVxoLKsFkLl1tnOo1/BTW9GN V1a3G8KIav+Uw4xFYMDXzwSDrkgZU4aQqNHL9YUqp3IbQgY4AJPvCDzU9XDLz2Sb1IVr oAZtd1YvE7DwkG5diPyanKAypZ/h9/pCOnLY0ySH/dyhEwbwRq72G6EzEGrxm3vqxPHO GkNFczsCWd8EnKEKE2FPPSzBF/K2SC7oaLEf5dfqUL7QbE/518AahOquwQ/BNkEBPt1U be+w== X-Gm-Message-State: ALQs6tAL5Omn7lH0ySa+eTwOmwTmL97aSiHzx4kQBSCRkvK99cU+l8hX NzD5yOnjUCd2P7C6wBdwHb9Enw== X-Received: by 10.28.94.210 with SMTP id s201mr1265049wmb.140.1524044439704; Wed, 18 Apr 2018 02:40:39 -0700 (PDT) Received: from andrea (nat-wifi.sssup.it. [193.205.81.22]) by smtp.gmail.com with ESMTPSA id m78sm1005533wma.25.2018.04.18.02.40.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 02:40:39 -0700 (PDT) Date: Wed, 18 Apr 2018 11:40:33 +0200 From: Andrea Parri To: "Paul E. McKenney" 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 Message-ID: <20180418094033.GA3409@andrea> References: <20180416162228.GA18167@linux.vnet.ibm.com> <1523895771-19224-2-git-send-email-paulmck@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523895771-19224-2-git-send-email-paulmck@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 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... > > 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? Andrea > -- > 2.5.2 >