Received: by 10.223.185.116 with SMTP id b49csp944992wrg; Fri, 16 Feb 2018 09:41:02 -0800 (PST) X-Google-Smtp-Source: AH8x225ypdKfMB3sNfbkHSMvxbGPjlmh3g2xOWsjIDjGPGY4cI8HAz1yQdoLN/NxESvnhgKV8m5c X-Received: by 2002:a17:902:47aa:: with SMTP id r39-v6mr2620716pld.72.1518802862793; Fri, 16 Feb 2018 09:41:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518802862; cv=none; d=google.com; s=arc-20160816; b=mFCty9njwNMjtpzqa2GMFbnmnfQXX2906YLB9QrUPwDYksZw/IMYN2n5F3ni2LG7GH /+5uv0y3VyH0HiAnylHm91TvH2SnY2lat5RY3+50xa7Iy7saavj6zopjFg3Q3jKEs+lE y9nOyKZBKg9YtZqEfOHk7L89QyI/Zd3SnQ/sZk6U9G+GIKIW5oiIbVu+63uB3HEHkblh uCrjHkT6eKXJotmnZ7xQTVxFzzKKPn+Ycl7ctWWA5vXVi63d2yOM8qnJf76eW4f4LBXN ZkrEj8itzu7xQSVtmOgIYic217IuCToV72r7XQFDMzuoFM2eeMCy5YpPSFCWjEPrCBjJ pCqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=R57m9MLIuV/6vnvB2lGn7q8Q4hyW60lifcts7nMrr2Y=; b=nAtqEg178wZcFKveiFmRjFnfPwffXEz0ialFLfp7UNAd3pbQRME2TQK2Vnk36J7RPX v+ly2nXnLz0JYphw8WIAT/ho6zIsiFCPl6VuFWZVLIpYJOUoHq9gB9qfdc+2HJ1p0Rly nsI/QNr6AXCnMZy8s/AulgQxxWo4DsLqrE3KeEVvUg34Rj/sjKRYihSU2l0tpgsKi7MY mRgwtQ2vSDYHxXKxnWYpNJ66BZrr98ulT12TpZoC6svUgaA5LvCnqdFmlka+5JV7/RJX DNj5HEGJk4OUCAmEeiwCpTpvw5ih0z/0Iqb1Vrrh3owRL1JL1S+rF6ecaAwvAO5TrP7Z lijA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uSzl2iPy; 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 v66si155145pgv.667.2018.02.16.09.40.47; Fri, 16 Feb 2018 09:41:02 -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=uSzl2iPy; 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 S1164242AbeBOVvT (ORCPT + 99 others); Thu, 15 Feb 2018 16:51:19 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:40901 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161926AbeBOVvR (ORCPT ); Thu, 15 Feb 2018 16:51:17 -0500 Received: by mail-pg0-f67.google.com with SMTP id g2so840379pgn.7 for ; Thu, 15 Feb 2018 13:51:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=R57m9MLIuV/6vnvB2lGn7q8Q4hyW60lifcts7nMrr2Y=; b=uSzl2iPycyUWjvF2L8Y7nq7nXOzhPttBewUyZGG+dltDBN+h1dQPzW7US0tguR6FXJ BVrEPLTendisynUhVi5zuyKiZht2JxwLg539Usjkxd/Nov77/PPp5ze85zqPdiTebsI0 hSKivKzNUUDawA9zo7Q/BLmy8f7qA7L7IRHpTdNpA4RrdfTRmTpdawDrLsif6W64u3Vl dUwhgNh7gJHjp0sf6AyooBBpIQGBtHmQIE4+ZaPhd4l3JN7IDKDctLjZrXojMgcaGvtr JpzuDpIJgAl0QRSJJOFB2upMnQkJF7aXkWsr8va4Gy/0i0sTnQGlpJC61AhkBNDqsj/d 1f7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=R57m9MLIuV/6vnvB2lGn7q8Q4hyW60lifcts7nMrr2Y=; b=Ym5LSyRoQXDtCpUw1dSa08C8daAlqxJmr4WoCCDQ5DBWRk5gQ7Z7WBzUOrfwP9m51I 1uYxC6OqaPGHSLY5DsyO1OCEKsMTm72ZKOI8AqDwA8MvLbmJNZhkX/pS+B+zpQ1ZSZTN x3Xucf13fYO1WbJMdtizSfhw2oVGa2Km0LzniQ62p2oVNajqqoAWi+qTrQ2pt238eEGJ p0h4S1bG8/WiPAqb4ZX2PB6PPUX/XB+sNfnH7rVa30dktmhGa4Qu44+//SEN4KPN36JE 3YOXBZOqSIS/klYuIzzOl/j18UeP9D6PEHT7aab/dLqsK7nSZuq09iPPzmqzyUdvykpc rKxQ== X-Gm-Message-State: APf1xPCiPdHexu/dupaG08k7MpEb9Sr/D6O9nEr36thyR+EmhGReb9n0 paIRvqW4wYOVveXwYFvfKIg= X-Received: by 10.98.194.18 with SMTP id l18mr3986812pfg.118.1518731477369; Thu, 15 Feb 2018 13:51:17 -0800 (PST) Received: from [192.168.11.4] (KD106167171201.ppp-bb.dion.ne.jp. [106.167.171.201]) by smtp.gmail.com with ESMTPSA id s26sm12167111pfm.93.2018.02.15.13.51.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 13:51:16 -0800 (PST) Subject: Re: Trial of conflict resolution of Alan's patch To: "Paul E. McKenney" , Alan Stern Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, 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 , Akira Yokosawa References: <20180215192914.GA3617@linux.vnet.ibm.com> From: Akira Yokosawa Message-ID: Date: Fri, 16 Feb 2018 06:51:11 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180215192914.GA3617@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/02/15 11:29:14 -0800, Paul E. McKenney wrote: > On Thu, Feb 15, 2018 at 12:51:56PM -0500, Alan Stern wrote: >> On Fri, 16 Feb 2018, Akira Yokosawa wrote: >> >>> So, I attempted to rebase the patch to current (somewhat old) master of >>> https://github.com/aparri/memory-model. Why? Because the lkmm branch >>> in Paul's -rcu tree doesn't have linux-kernel-hardware.cat. >>> >>> However, after this change, Z6.0+pooncelock+pooncelock+pombonce still >>> has the result "Sometimes". I must have done something wrong in the >>> conflict resolution. >>> >>> Note: I have almost no idea what this patch is doing. I'm just hoping >>> to give a starting point of a discussion. >> >> Yes, that litmus test gives "Sometimes" both with and without the >> patch. But consider instead this slightly changed version of that >> test, in which P2 reads Z instead of writing it: >> >> C Z6.0-variant >> >> {} >> >> P0(int *x, int *y, spinlock_t *mylock) >> { >> spin_lock(mylock); >> WRITE_ONCE(*x, 1); >> WRITE_ONCE(*y, 1); >> spin_unlock(mylock); >> } >> >> P1(int *y, int *z, spinlock_t *mylock) >> { >> int r0; >> >> spin_lock(mylock); >> r0 = READ_ONCE(*y); >> WRITE_ONCE(*z, 1); >> spin_unlock(mylock); >> } >> >> P2(int *x, int *z) >> { >> int r1; >> int r2; >> >> r2 = READ_ONCE(*z); >> smp_mb(); >> r1 = READ_ONCE(*x); >> } >> >> exists (1:r0=1 /\ 2:r2=1 /\ 2:r1=0) >> >> Without the patch, this test gives "Sometimes"; with the patch it gives >> "Never". That is what I thought Paul was talking about originally. >> >> Sorry if my misunderstanding caused too much confusion for other >> people. > > Ah, I did indeed get confused. I have changed the "Result:" for > Z6.0+pooncelock+pooncelock+pombonce.litmus back to "Never", as in > the patch below (which I merged into the patch adding all the > comments). > > I have added the above test as ISA2+pooncelock+pooncelock+pombonce.litmus, > with the Result: of Sometimes with you (Alan) as author and with your > Signed-off-by -- please let me know if you would prefer some other > approach. > > Please change the Result: when sending the proposed patch. Or please let > me know if you would like me to apply the forward-port that Akira sent, > in which case I will add the Result: change to that patch. Or for that > matter, Akira might repost his forward-port of your patch with this change. > Hi, My forward-port patch doesn't apply to the "lkmm" branch. It looks like "linux-kernel-hardware.cat" is intentionally omitted there. Am I guessing right? If this is the case, I can prepare a patch to be applied to "lkmm". But I can't compose a proper change log. So I'd like Alan to post a patch with my SOB appended. Does this approach sound reasonable? Thanks, Akira > Thanx, Paul > > ------------------------------------------------------------------------ > > commit b2950420e1154131c0667f1ac58666bad3a06a69 > Author: Paul E. McKenney > Date: Thu Feb 15 10:35:25 2018 -0800 > > fixup! EXP litmus_tests: Add comments explaining tests' purposes > > Signed-off-by: Paul E. McKenney > > diff --git a/tools/memory-model/litmus-tests/Z6.0+pooncelock+pooncelock+pombonce.litmus b/tools/memory-model/litmus-tests/Z6.0+pooncelock+pooncelock+pombonce.litmus > index fad47258a3e3..95890669859b 100644 > --- a/tools/memory-model/litmus-tests/Z6.0+pooncelock+pooncelock+pombonce.litmus > +++ b/tools/memory-model/litmus-tests/Z6.0+pooncelock+pooncelock+pombonce.litmus > @@ -1,7 +1,7 @@ > C Z6.0+pooncelock+pooncelock+pombonce > > (* > - * Result: Never > + * Result: Somtimes > * > * This example demonstrates that a pair of accesses made by different > * processes each while holding a given lock will not necessarily be >