Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7592261imu; Tue, 22 Jan 2019 08:22:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN7kn/BvYN9yH4qdtfV1YLE40gon1bwMC+F+hAVQXGaf95DPxZyvqRamyBK3o+rIgSd2cD3F X-Received: by 2002:a63:6782:: with SMTP id b124mr32838373pgc.151.1548174127876; Tue, 22 Jan 2019 08:22:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548174127; cv=none; d=google.com; s=arc-20160816; b=c8k06WUUiQP71uSrUB+LGxrsSmbPZLXpA4sAzM1ND5cvnukdnREOXVgYOCGhVcSWK1 DtU9/QlmbYjlaNvrK1MfiyJZ+3Q4p97Ri2Gda3Mz+dlxXlz+0hUjnM8NvbvW/MtmWH+n JKBypPXc+AXK9SeAvgafqJc0FqENj6RQ2TEIAhYuKIyykBqi+t3nhYCizH0ju3eKdWBH iORxZzTPxyklRuBh+ehcMvUS6vH+gLE53AY6KrdVr60RuC2xCNeJf3oaAw+qFR90xIgd MwqrvqGnackV675smF3ntdrTjrnRQUxVgkhlgUWhVbaZ8qcGOFxSu2xHUKyX9HJdAQFb tdJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=mhlG4HgzhGArTSBK4ck+lc76Fx4vRrJklcAp7ZW/BOQ=; b=XouBWSWnkb0mZhSIM9VJ/WdxQuWU1NhocUmenS8jZSNWUO+zlkHZyQKp71IFaRwPjH wg1t6y4aZBQBs42FzwAS5T1zzeCDFRv/OJKTiEyp0ZNMto6Db8nX6QBcbWbeLAEVFRyy j5pkprZIpQXY+79QNRw/6CaoA1+cWC7+HuQswHjfQRaNhrJvUNKkMA56pKdg7N+UfEH+ CCZnCjiupDTMNvCCmuNmLfYicim8K5CpPmX2Wiif4+BSqfJS/FTic4R4pzXTtvSj4d8H 0FpN2qMR+FTuhgefY1y3KfBrLGNG0wpd1a+3ihmGbUUmwEJxThMN6hqGOZ/s/bYzDw4U Vq9g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1si11833339pgs.417.2019.01.22.08.21.51; Tue, 22 Jan 2019 08:22:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729263AbfAVQTO (ORCPT + 99 others); Tue, 22 Jan 2019 11:19:14 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:35222 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1728669AbfAVQTO (ORCPT ); Tue, 22 Jan 2019 11:19:14 -0500 Received: (qmail 4260 invoked by uid 2102); 22 Jan 2019 11:19:13 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Jan 2019 11:19:13 -0500 Date: Tue, 22 Jan 2019 11:19:13 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Andrea Parri cc: LKMM Maintainers -- Akira Yokosawa , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Will Deacon , Dmitry Vyukov , Subject: Re: Plain accesses and data races in the Linux Kernel Memory Model In-Reply-To: <20190122154745.GA13659@andrea> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Jan 2019, Andrea Parri wrote: > > @@ -131,7 +159,7 @@ let rec rcu-fence = rcu-gp | srcu-gp | > > (rcu-fence ; rcu-link ; rcu-fence) > > > > (* rb orders instructions just as pb does *) > > -let rb = prop ; po ; rcu-fence ; po? ; hb* ; pb* > > +let rb = prop ; po ; rcu-fence ; po? ; hb* ; pb* ; [marked] > > Testing has revealed some subtle semantics changes for some RCU tests > _without_ unmarked memory accesses; an example is reported at the end > of this email. I suspect that the improvements you mentioned in this > thread can restore the original semantics but I'm reporting this here > for further reference. > > With the above definition of 'rb', we're losing links which originate > or target RCU fences, so that this definition is in fact a relaxation > w.r.t. the current semantics (even when limiting to marked accesses). > The test below, for example, is currently forbidden by the LKMM, but > it becomes allowed with this patch. > > FWIW, I checked that including the RCU fences in 'marked' can restore > the original semantics of these tests; I'm still not sure whether this > change can make sense though.... > > Thoughts? Ah, a very good discovery. I think changing marked to ~plain in a few places would be a better solution. Or maybe allowing plain accesses in those places will also be okay -- it's hard to judge at this point. > Oh, one last (and unrelated) nit before I forget: IIUC, we used to > upper-case set names, so I'd also suggest s/marked/Marked, s/plain/Plain > and similarly for the other sets to be introduced. Okay, I'll follow that convention. Alan