Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3591091ybe; Sun, 15 Sep 2019 19:36:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyig+0u+GLws1EAfTohs+Cq5oxU6ZF1J7TTH16E2zoeZE5g/nvRRuBb+HwLF4FCCBtFgXW1 X-Received: by 2002:a50:b582:: with SMTP id a2mr44112493ede.98.1568601407672; Sun, 15 Sep 2019 19:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568601407; cv=none; d=google.com; s=arc-20160816; b=ZqUfymWPD5piA50Smlnt3/t8q8AQpLuSC3WHHODf5jk3ybNL9+KuThLuLm/mE+OWg+ nswz+8BEZWfFYiFZNIjmfkx4QjHkwJAZLEkunckxI3vyHXTzLyDdUKwFaN2HV8OgN9Kt HaFyybMAXePl9OaeUFZGuE9cAPFYvylBwKNxwhrRJ56kCoXxRvkd6sk1EgNhv8HK60Mo rndqbLVXO+yOHGOcDrFZbWONtiTRDby2WFRDNKFLdcW8gqnZ75N0yHrjVV3MuDyM2yvJ xrdfRvyluyHh5NA+q/rINfD399k2lWbDFX6BvAjAliUu5tXf2/BM27bu5gVEAbX/HqIJ vq4w== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=lat9MvX33Ugt2Fy1bmnml8t+mvMqdnCsyuIDjwVqFiM=; b=0mpCodOFJMxbqwU0My5qbCZdPr+N5LigwTw44LBqqUU+Pa1J6alShM9JmCwxZAR6Qc 7+7izzqBrz7WQDZR6nP8H7tW+rGg+BBImtBFAb1Vppw+eedtd63P7sFPgkZfOH8GJHAk Ftnn8THdrG4eQT8XTIIanlh6yq2YvhgTMBM/h+1mLUi48JwGQUoia1IucWAAJB0krAV/ p4Se25jqBJIothEqhqGlp1BFgl96wnmtgTJ+ZKp8JpM8r1W0DaEMqwMmOniK+0OflPiS Jpafl9OF5PRmGy8GbfgGSXuryixMtKLmo9SxlGbV6nUZPPH+OGWLdw2YGvvZ57YHfX8N sBFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YhP0D+bp; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si1611533ejd.123.2019.09.15.19.36.24; Sun, 15 Sep 2019 19:36:47 -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=@kernel.org header.s=default header.b=YhP0D+bp; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728782AbfIOXN4 (ORCPT + 99 others); Sun, 15 Sep 2019 19:13:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:47024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725775AbfIOXNz (ORCPT ); Sun, 15 Sep 2019 19:13:55 -0400 Received: from paulmck-ThinkPad-P72 (96-84-246-146-static.hfc.comcastbusiness.net [96.84.246.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6795F20692; Sun, 15 Sep 2019 23:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568589234; bh=Pv4ZoqOl04Js8kGfWzjqHlfBlZLxkRggaaEzQSoVQRc=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=YhP0D+bpxOaXtrQrZZHYgKJzEKZVmcJeDosmx5WMZ7sDY7tP9qRE3txRIBoyH1gVS v4vrn71s0VTDNw6Rd/HUVSGKXWwo+4hvDCZK3Kjej8OebLLhr5OZF/h4X/VVezgYzu Re7bpbb5xdldrgatMdwgjE0iiNuWByMiT07drdc0= Date: Sun, 15 Sep 2019 16:13:51 -0700 From: "Paul E. McKenney" To: Alan Stern Cc: LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , Daniel Lustig , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Kernel development list Subject: Re: Documentation for plain accesses and data races Message-ID: <20190915231351.GS30224@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20190912220126.GA14560@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 13, 2019 at 03:13:26PM -0400, Alan Stern wrote: > On Thu, 12 Sep 2019, Paul E. McKenney wrote: > > > On Fri, Sep 06, 2019 at 02:11:29PM -0400, Alan Stern wrote: > > > > To this end, the LKMM imposes three extra restrictions, together > > > called the "plain-coherence" axiom because of their resemblance to the > > > coherency rules: > > > > > > If R and W conflict and it is possible to link R to W by one > > > of the xb* sequences listed above, then W ->rfe R is not > > > allowed (i.e., a load cannot read from a store that it > > > executes before, even if one or both is plain). > > > > > > If W and R conflict and it is possible to link W to R by one > > > of the vis sequences listed above, then R ->fre W is not > > > allowed (i.e., if a store is visible to a load then the load > > > must read from that store or one coherence-after it). > > > > > > If W and W' conflict and it is possible to link W to W' by one > > > of the vis sequences listed above, then W' ->co W is not > > > allowed (i.e., if one store is visible to another then it must > > > come after in the coherence order). > > > I will need to read this last section again. Perhaps more than once. ;-) > > I decided this part could use some improvement. Here is the updated > text: > > > To this end, the LKMM imposes three extra restrictions, together > called the "plain-coherence" axiom because of their resemblance to the > rules used by the operational model to ensure cache coherence (that > is, the rules governing the memory subsystem's choice of a store to > satisfy a load request and its determination of where a store will > fall in the coherence order): > > If R and W conflict and it is possible to link R to W by one > of the xb* sequences listed above, then W ->rfe R is not > allowed (i.e., a load cannot read from a store that it > executes before, even if one or both is plain). > > If W and R conflict and it is possible to link W to R by one > of the vis sequences listed above, then R ->fre W is not > allowed (i.e., if a store is visible to a load then the load > must read from that store or one coherence-after it). > > If W and W' conflict and it is possible to link W to W' by one > of the vis sequences listed above, then W' ->co W is not > allowed (i.e., if one store is visible to a second then the > second must come after the first in the coherence order). These look good to me! Thanx, Paul