Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp751172imm; Thu, 5 Jul 2018 08:17:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpecE6jzvVMpipsYbxbuJCT+yzrKciWwcJI+7pDFzDwZj+k+Yan9BTMi1IrcVBFz77AQLQoy X-Received: by 2002:a63:6243:: with SMTP id w64-v6mr1404385pgb.179.1530803828488; Thu, 05 Jul 2018 08:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530803828; cv=none; d=google.com; s=arc-20160816; b=m8SyTA1TKC7QtnA5bINzedkksZnTjIpaaDaTJMk/1tAUjwfCpmDUEm8a7yh4Kvwf7B /z8fSPjUX0NU+/isHt/Vr/fdPUz7hc209WLp5lgQCwhOwy2XTBxA6n5rf/F2DsEhvgzN 8WQSu2OlPwhnJUJLaM/sNhkH5koycm2b8w3tWCNrwIPeXUTIE6DKJuFIE0riOkmLo4p9 /Zxzt3FcxzDCqxJ1/sSZsLKpxgky+X56ZBJFerk3pxJfY5rqIGe+oyWAd2tajgxLW6Yf nJ11y2qu3ublFwIcITm0nsclVAby2ZuypN1qCWmXpOn132sedN7VLj+gHv3YIXXl7Rwe XXyQ== 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:arc-authentication-results; bh=QRxRCIq68pVgjzYacvAD2kQdaQL8KzVSkuZur/x71to=; b=u2/d/pQ3Du8SyPGJYcIGEcWyy3k7IaXkqt5C5Wgo9qfJR6O/6+IDn98+8FA+A30MXK Sz9EJHLg+kxopW8lzDAILAhLcNflEQyf5ovzEEau5985BuhwysFLkgBSM0g7ie5sNd8B 3eKsrOSD8kYe9Ha29uutzQIw4Bcws7WI4XsMrIIvTPsXouoxmAFykiqCRA5MA/U9e8PK cdZc3ICUhcKISTC207aVLpDjqzeIh+g5R4usiAff0CuM4L3An+fuhBiTLc25pcZZoHYK dpFx+oxe9PLiAFYz4pLPChURN55YSCynTAEfFSxBxUlYWsglOQkF2aK+XXNFFg7YhJ0c 37gg== 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 r73-v6si3460963pfk.83.2018.07.05.08.16.40; Thu, 05 Jul 2018 08:17:08 -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 S932144AbeGEPPO (ORCPT + 99 others); Thu, 5 Jul 2018 11:15:14 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:51734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754040AbeGEPPN (ORCPT ); Thu, 5 Jul 2018 11:15:13 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0DB3318A; Thu, 5 Jul 2018 08:15:13 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D2A923F5BA; Thu, 5 Jul 2018 08:15:12 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 20F321AE3638; Thu, 5 Jul 2018 16:15:53 +0100 (BST) Date: Thu, 5 Jul 2018 16:15:53 +0100 From: Will Deacon To: Alan Stern Cc: Andrea Parri , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Kernel development list , dlustig@nvidia.com Subject: Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks Message-ID: <20180705151552.GG14470@arm.com> References: <20180705144656.GF14470@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 05, 2018 at 10:57:28AM -0400, Alan Stern wrote: > On Thu, 5 Jul 2018, Will Deacon wrote: > > On Thu, Jul 05, 2018 at 10:21:36AM -0400, Alan Stern wrote: > > > On Wed, 4 Jul 2018, Will Deacon wrote: > > > > On Tue, Jul 03, 2018 at 01:28:17PM -0400, Alan Stern wrote: > > > > > Would this be allowed if smp_load_acquire() was implemented with LDAPR? > > > > > If the answer is yes then we will have to remove the rfi-rel-acq and > > > > > rel-rf-acq-po relations from the memory model entirely. > > > > > > > > I don't understand what you mean by "rfi-rel-acq-po", and I assume you mean > > > > rel-rfi-acq-po for the other? Sounds like I'm confused here. > > > > > > "rfi-rel-acq" is the relation which was removed by the first of my two > > > patches (it is now back in business since Paul reverted the commits), > > > and "rel-rf-acq-po" is the relation that was introduced to replace it. > > > > Sorry, yes, I realised this after I'd replied. Curious: but why do you name > > the relations this way around, as opposed to e.g. rel-rfi-acq? It's > > obviously up to you, but I just couldn't figure out what inspired the > > ordering. > > I no longer remember the reason for naming "rfi-rel-acq" the way I did. > As you say, it doesn't make a lot of sense. Fair enough! > The reason for "rel-rf-acq-po" instead of "rel-rfi-acq-po" was because > the second of the two patches uses that relation in a context where the > release and the acquire might very well run on different CPUs. Ok, that makes sense. I realised that I've only been thinking about RCpc making a difference in the rfi case, because Armv8 is multi-copy atomic so we don't allow early forwarding from a release to an RCpc acquire if they are from different CPUs. Again, I'd be interested in what other architectures have to say here (i.e. whether RCpc acquire/release instructions are likely to exist in a non multi-copy atomic architecture). Will