Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4565593ybe; Mon, 16 Sep 2019 14:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOLpORSzHYgDA8zhYSYH1y+CnVLOKcaLqovgIEYcIJKrvRDpNRmm/3/J4TD7H+fysD11bp X-Received: by 2002:a17:906:6848:: with SMTP id a8mr2006084ejs.104.1568669641976; Mon, 16 Sep 2019 14:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568669641; cv=none; d=google.com; s=arc-20160816; b=IxRZ1Pv/MJTaed1jWiuitnEWxQd4MEFNZjjOcIy/XXVwiQ+JVtrxG41yeOAYWXySXx vX+1FP+oPJ1vy029Nm/TTDutjLwuJChF4flzoInDkDq83kx+QvmKbVWIwCGdh74hHK4F RjiLAIh+/FF9yrQzYf68PPdALCOMsIXCznVt07QUrPppqsUZ24iRiFEomvhjKiRMJZFV kXAyP70p84UJ/SSTUW/lcLqA2uFdIc2HGhq2KvHqdIzrPxo43yWhYZCddeKwGjwE0uEJ K7mYJoloFomTj/NNF87TWvW9BVMSLTyVfzxxNgReRutU6u4/4NL2nZyVSd+dV7wvUA+Q 2Qdw== 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=MuC2ILNLH2SIkOpZQxz0rJD0MCEwTvxH+C+UBLPh/2M=; b=ybpcbDHxwC49agRBNgi62bCAro2Z8A7XZEwqaaOGMmKxcSDQ0HGmJcjCMJ6HYpBMCI r5OrNgG5AJjs0JgGc/7R+hD4VmN94lxGVuub94khlXqohpvjddahobbErZZ+cfECCZwY 8dW1108dTNiPvrJnEHSG2sFdtocL3Obn4sH5kjGj960bT71bNogQwNRyHJO5vCrSRkmy M/5HL2wVGHpMTia35xD8P5o6S/cHlcsEG6JtvXZD8rZrGpgxeVWRIWH+DjHSkA6JnF/4 hMKABFHyCVOHDq8Ade9Nw85TkWRi+hOua+TphhocUclg7uCEwskEPU96zc9Om1X82+Td aTQw== 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 sa2si79600ejb.303.2019.09.16.14.33.38; Mon, 16 Sep 2019 14:34:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389015AbfIPPWU (ORCPT + 99 others); Mon, 16 Sep 2019 11:22:20 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50980 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726389AbfIPPWT (ORCPT ); Mon, 16 Sep 2019 11:22:19 -0400 Received: (qmail 3452 invoked by uid 2102); 16 Sep 2019 11:22:18 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 16 Sep 2019 11:22:18 -0400 Date: Mon, 16 Sep 2019 11:22:18 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Boqun Feng 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 In-Reply-To: <20190916051753.GA29216@tardis> 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 Mon, 16 Sep 2019, Boqun Feng wrote: > > 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: > > > > 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), > > > > 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 > > X ->coe X' (and X' in on CPU C) > > , X must be already propagated to C before X' executed, according to our > operation model: > > "... 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." You have misinterpreted the text. The operational model says that if X propagates to CPU C before X' executes then X ->coe X'. It does _not_ say that if X ->coe X' then X propagates to CPU C before X' executes. > In other words, we can define ->vis as: > > let vis = prop ; ((strong-fence ; [Marked] ; xbstar) | (xbstar & int)) > > , 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: > > c683f2c807d2 "tools/memory-model: Fix data race detection for unordered store and load" > > , and data race rules will look more symmetrical ;-) > > Thoughts? Or am I missing something subtle here? See above. Alan