Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp386006imp; Wed, 20 Feb 2019 01:59:46 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ6X+asqEIWiEsrYow7uIw0HwkMEz1AQ9Oy2u410QRIer+Gj0z8XkK8MUaqkcra4l7c8iJ/ X-Received: by 2002:a62:3c1:: with SMTP id 184mr34275661pfd.56.1550656786909; Wed, 20 Feb 2019 01:59:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550656786; cv=none; d=google.com; s=arc-20160816; b=h401oHUXw1Pnnnr8kxLAGOSyarXoPSJydWrYHWb8t9qrqFDcGr6FKaZ/xg+b1ofkAg cCU7AUGm44Jy969a3/7Rsab4JXybe/y+upA6/Vom2gTCKKf1btQWCLj1ne6A1wJwHSlO f//Kv9/cVOdXplJXj/rmI95ybimtriEY06TFlSd3IMOI5KNv5CfnhhRpB3rC7QRo+kgs vbQlYE8vA/k8IE3VV5UUHJy6twJjI4OSBVl77PTzIObUuZYSs0YSPMYvcLz5XLgYkbI7 FublYKkMdfrSR+Xqlmgnt/va0AhoivdWknqWrsPW6IJwYJgvriD+Wb4H715YfcHaqdkd iOrg== 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; bh=/llgS82IgJHHwxrVzSwS5LJiFM10JwYgurfXm2v/Gjo=; b=Fomy2dUaisSW7DxwmOPAmkVOeSdTnDGKjt5Aw0VEREnx+PDEUhPjMTAN/6MfoNwneU sX0fvXeHR62d7Q0hdCrFU/pg/X20Num7tdbnbf4AWwoqVH+TyWxcEqG04+zuytTevg4X u0ETUzxpTYbk89X+ERXP6i1yRifb5xm0KzcX8uAhM5DCYwD6E7NeFlovZHBFhijy+G7B x4mMGYCpRTCG7KVPZ839VpetmjmAZR6DFlfA2Tj3i+4IRkr23RiV4Fn6112KB1S+EGEQ 0SQ0utBrkyT3VKh+FtLgwJgGieimr3d3u3PW3uFDDpBu9iLsUg5jN3U6QluOAmrcpHsd 4GXA== 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 d63si13365146pfg.40.2019.02.20.01.59.31; Wed, 20 Feb 2019 01:59:46 -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 S1727480AbfBTJ5L (ORCPT + 99 others); Wed, 20 Feb 2019 04:57:11 -0500 Received: from foss.arm.com ([217.140.101.70]:54978 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbfBTJ5J (ORCPT ); Wed, 20 Feb 2019 04:57:09 -0500 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 ACF29A78; Wed, 20 Feb 2019 01:57:08 -0800 (PST) Received: from brain-police (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8E9A43F575; Wed, 20 Feb 2019 01:57:05 -0800 (PST) Date: Wed, 20 Feb 2019 09:57:00 +0000 From: Will Deacon To: Peter Zijlstra Cc: "Paul E. McKenney" , Andrea Parri , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Alan Stern , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig Subject: Re: [RFC PATCH] tools/memory-model: Remove (dep ; rfi) from ppo Message-ID: <20190220095659.GA17578@brain-police> References: <1550617057-4911-1-git-send-email-andrea.parri@amarulasolutions.com> <20190220020117.GD11787@linux.ibm.com> <20190220092604.GD32494@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190220092604.GD32494@hirez.programming.kicks-ass.net> 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 Wed, Feb 20, 2019 at 10:26:04AM +0100, Peter Zijlstra wrote: > On Tue, Feb 19, 2019 at 06:01:17PM -0800, Paul E. McKenney wrote: > > On Tue, Feb 19, 2019 at 11:57:37PM +0100, Andrea Parri wrote: > > > Remove this subtle (and, AFAICT, unused) ordering: we can add it back, > > > if necessary, but let us not encourage people to rely on this thing. > > > > > > For example, the following "exists" clause can be satisfied with this > > > change: > > > > > > C dep-rfi > > > > > > { } > > > > > > P0(int *x, int *y) > > > { > > > WRITE_ONCE(*x, 1); > > > smp_store_release(y, 1); > > > } > > > > > > P1(int *x, int *y, int *z) > > > { > > > int r0; > > > int r1; > > > int r2; > > > > > > r0 = READ_ONCE(*y); > > > WRITE_ONCE(*z, r0); > > > r1 = smp_load_acquire(z); > > > r2 = READ_ONCE(*x); > > > } > > > > > > exists (1:r0=1 /\ 1:r2=0) > > > > Any objections? If I don't hear any in a couple days, I will apply this. > > IIUC you cannot build hardware that allows the above, so why would we > allow it? Agreed. Maybe the intention was to make the dependency between the read of *y and the write of *z on P1 a control dependency instead? That's certainly allowed on arm64. Will