Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4815264ybe; Mon, 16 Sep 2019 20:04:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqynLBLv5FdEyPlWJcGiT9GzFFwl/Cwofg0GUN/GNWfvj+JhLNg3EoamQyKukhcjcj8e9wU9 X-Received: by 2002:a17:906:1903:: with SMTP id a3mr2811922eje.112.1568689492867; Mon, 16 Sep 2019 20:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568689492; cv=none; d=google.com; s=arc-20160816; b=pYQhijBcnqDW9AIup4sTVpbBfvTe3/De+4aV8umnWoN1JCsLSAr6RR2fL2S9/DdSyi ej3FtclJBoNJG0/TGyUufsnDlyN5o9QnL6mmEdVBungLQPuT7TqlwOC+g2KFE99eef6z s5mye/embaISLserDQoAgFVi876/r1PXwMrj11sadeJ5x53ePefjNhZu5W0qtKyX4Iod ywR+/P1sNGxtG+RjWAITVbBYOUhDem3ikEvoLyLYranBzfCytpCFiOTnSxXfB0E30CX4 6bmkfynMJlt7wxt0xoALCED+viYY4ZKEWe/NcLX1VmImyApKBjEFh1BxUVzIdSQb/r35 wjng== 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; bh=/JCl5+AcFNZjHwWLbdBMk4uE1g6+dzFlsFeAZIwe6Mg=; b=Cjh3bWeURHD0FJpBjdTrYDR3QV3ApExknIVZ5iHKx/ID0NT37qJfi16P2wj7ATG/St bqZMkz/a5pHmiJ7YXg+inVYvRw5yhvRLk73Zhs6Wr04ZbzkO8UcdRhTaCEhJzkOJbZzv exy7c/JiRdAwyRy2kcM6z6BWxMMb+h/Ph+2g/pPzXwH1YhHpDDd2rpTm8bQ82u04lj2D gp+gU12vAcBWdpPUvb6Zy86Wb6U6ABQOeZpoUK9iqsjm1QNL2YdHyxboWUpQe+ca1yx7 NVWdtQcv+anCu/hgmoYuRATHyYIXe6AXDqdklMbYGWumbxBrRZZnBxBAPy43qwGPjQLA 5L9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Alh6u2eG; 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 b22si566357eda.194.2019.09.16.20.04.28; Mon, 16 Sep 2019 20:04:52 -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=@gmail.com header.s=20161025 header.b=Alh6u2eG; 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 S2390087AbfIPQm5 (ORCPT + 99 others); Mon, 16 Sep 2019 12:42:57 -0400 Received: from mail-qt1-f171.google.com ([209.85.160.171]:36012 "EHLO mail-qt1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbfIPQm4 (ORCPT ); Mon, 16 Sep 2019 12:42:56 -0400 Received: by mail-qt1-f171.google.com with SMTP id o12so633988qtf.3 for ; Mon, 16 Sep 2019 09:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/JCl5+AcFNZjHwWLbdBMk4uE1g6+dzFlsFeAZIwe6Mg=; b=Alh6u2eG8B+vfs3WVleXi1vhIiMXKuFlWwf8Jpk+qwh+zJmnNyBo1T7cRicm6k/9m9 RUWcZp6gqEfz7MSXhp/oHiLRaQJpx0+EaWxa2cj+9iz1/vkiUxlfVQvHVidUDxb52FEs drjlbhRhMx0vluZeHL0IphTcYnGpiPJ7bTpgAzaO8oHnVT62AY4VSvOfUT+2MnSEBWWy gNoXkfQ99LACp+HQDm3pyw01eajnBUTcB8eV8dxcpV+RE1hI8ubmotYaM6fJzkE3TRzl EgdNH6hEH6AiE7UtcDWKF4Yl6CXds0G+2qAnaYk8lnYXE1VeeFGLpA+QcSoe7SPCA1jq i7vw== 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=/JCl5+AcFNZjHwWLbdBMk4uE1g6+dzFlsFeAZIwe6Mg=; b=m9qBDjmV/2vxsPAWlEVQoBBUszeKHVV0aCJ0AXofAl8VVu6fTQ6jeIdMUNdNvRxwAM gM5WMaD6sgFwBnngijjvz5dd8uaPIm0BC/bLkIf0MIl8NjwETULvRzeZx4ta2OFMV4zD PTBdEjjwzZOd1O9JhSwJyGrgv4RHXYSWBhO9wLNC/MLZzEbQ5bHTI543AFaPjspAxen7 v/bV4GPYjim0Dt5e8xOZZr6mNJUy2aWxrJSJ4CHkJjehO5T1AVlmvy8/hodP8RxcIQ8+ g3/1PWtmVIk3xB/CL6HfTVuKU6qWh6m9j943vHP6qOTYE2ImpTyqix8EA3+h+lIxhypR eZwg== X-Gm-Message-State: APjAAAX1L8G/zVgsPYAHgbfBa8DrUrBhkgItilDRkwImYvSSNL1bPytp l4BYCpolCVshI752SfqwPR8= X-Received: by 2002:ac8:1658:: with SMTP id x24mr565705qtk.196.1568652175312; Mon, 16 Sep 2019 09:42:55 -0700 (PDT) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id g31sm24706738qte.78.2019.09.16.09.42.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Sep 2019 09:42:54 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailauth.nyi.internal (Postfix) with ESMTP id 1DB7921F57; Mon, 16 Sep 2019 12:42:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 16 Sep 2019 12:42:53 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjfgesghdtreertdervdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucfkphepge ehrdefvddruddvkedruddtleenucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdo mhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieegqddujeejke ehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgr mhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (unknown [45.32.128.109]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B06A80064; Mon, 16 Sep 2019 12:42:51 -0400 (EDT) Date: Tue, 17 Sep 2019 00:42:46 +0800 From: Boqun Feng To: Alan Stern Cc: LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Will Deacon , Kernel development list Subject: Re: Documentation for plain accesses and data races Message-ID: <20190916164246.GA7098@tardis> References: <20190916051753.GA29216@tardis> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 16, 2019 at 11:22:18AM -0400, Alan Stern wrote: > On Mon, 16 Sep 2019, Boqun Feng wrote: >=20 > > > executes if Y is a store.) This is expressed by the visibility > > > relation (vis), where X ->vis Y is defined to hold if there is an > > > intermediate event Z such that: > > >=20 > > > X is connected to Z by a possibly empty sequence of > > > cumul-fence links followed by an optional rfe link (if none of > > > these links are present, X and Z are the same event), > > >=20 > >=20 > > I wonder whehter we could add an optional ->coe or ->fre between X and > > the possibly empty sequence of cumul-fence, smiliar to the definition > > of ->prop. This makes sense because if we have > >=20 > > X ->coe X' (and X' in on CPU C) > >=20 > > , X must be already propagated to C before X' executed, according to our > > operation model: > >=20 > > "... In particular, it must arrange for the store to be co-later than > > (i.e., to overwrite) any other store to the same location which has > > already propagated to CPU C." >=20 > You have misinterpreted the text. The operational model says that if X= =20 > propagates to CPU C before X' executes then X ->coe X'. It does _not_=20 > say that if X ->coe X' then X propagates to CPU C before X' executes. >=20 Alright, I got confused. If X ->coe X', we only have "X must execute before X' propagated to the CPU of X" (otherwise, we will have X' ->coe X), so we will only know the execution time of X (not the propagation time) is before the propagation of X' to the CPU of X, and that won't help build the visiblity, because we know zero about the propagation time of X to any CPU. > > In other words, we can define ->vis as: > >=20 > > let vis =3D prop ; ((strong-fence ; [Marked] ; xbstar) | (xbstar & int= )) > >=20 > > , and for this document, reference the "prop" section in > > explanation.txt. This could make the model simple (both for description > > and explanation), and one better thing is that we won't need commit in > > Paul's dev branch: > > =09 > > c683f2c807d2 "tools/memory-model: Fix data race detection for unordere= d store and load" > >=20 > > , and data race rules will look more symmetrical ;-) > >=20 > > Thoughts? Or am I missing something subtle here? >=20 > See above. >=20 Thanks! Regards, Boqun > Alan >=20 --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEj5IosQTPz8XU1wRHSXnow7UH+rgFAl1/u4IACgkQSXnow7UH +riWSwf/Qh5r3G2a6SpaN6aJf2TTnJ6jEVSUgwr+Yqx0F61lcC43s5jkt0ZKtqv9 fbxTEr3DzmtSGZfsmBW1hvdnHs93//L+BGB77jAvB3Lb25WZDtfeUFjHtZessGRw yOxPmFXS+ftvtfOZKUeTXw9C3586NOAGCyiDyMjfvVUYKZTSnlQl/cMbaE+WWBGl f5CJYIOcI4q9Mj8YpZyxa/aoYwOhhYVvo/TUZIZSuiczRb91+d/sJiMCrYd0rHoZ oOR3ZTfOEYlDOC9tXqQCwyKbQfMZJfWELtpZn3uJPzOSskEiA7ZfTo0VfgicriA6 jlxx9ENREq7m0e8RqrMX/H8woULzuA== =bT+E -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY--