Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp568631imp; Wed, 20 Feb 2019 05:20:00 -0800 (PST) X-Google-Smtp-Source: AHgI3IaUjikn4d0uZVbvsNg/VftCnYxNLfRFrXv2oYH60ng9gChuGbEzYIQ46/mhhHNj4Bb5F+zj X-Received: by 2002:a62:9f51:: with SMTP id g78mr23433097pfe.171.1550668799966; Wed, 20 Feb 2019 05:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550668799; cv=none; d=google.com; s=arc-20160816; b=iXZJZfGB6nsF1eEy+Bpit+1il9oZw5ZV9Ovth4DaoPdSYlf/N/wOBeUwuptvkD2ZOq H9p6/gkxQGLRqPE84amqLtYXoIuCoTubkT0SNCGC3j9IjNHaHkCCF/FKl9CIXjXA0nQY vd/ZAFhgHSDxzGj75bod5WwUDrMXtiHqoiHnIir2HwV48ZIWXjw8yHirp2SDrjustc4b Nckl8i994Ptawbe0iMFJRYRvi3VpHHX/6WFkks5JkNuL0qwihVAG2AixSIe0pUXg52kh lxXiUZavRbl9FPdq1E6kz64MovbUTOEs0fu2kmJmjqEE7pqbRL3uKzBSgDlc4ODcRX8O NHZg== 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=PG/uhxa3b+MdI8LWNjKVY+NfUULqMl2h5FlcRZcEgNI=; b=Y5IgAzMiRudArgdbXwvAjUDaJOEeMqpBx3F4MWonP4PW0QbuTMrMcyLrixThLddkdo SZVUTQv0+NzQ4ShAc9YC/5rfbwxtU0fKkhs78OdHVqLIIAs8S3lAn7uP3B5na8edGgq9 bkjPlAJ9uJhWyzBiKjPViwhVuTNiaPwIRBumIp8VG3lrYQHTV1JETEVMoXz6l1XsfBXc 8F2SPE6en5vMoszYR81BU7Tp1WFc5NvyNvLkoDbNTC5EVU5Z57Wh5AZw+kWRpNYnkZ3N QdcJzleMJNXfNKJFBruZdFCes7nBDbGcp4qkJu6p4S6LjMklkE6dVOdrKxE/wMBlnn7q 3/2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WCSw3AAS; 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 c7si7616317plr.276.2019.02.20.05.19.44; Wed, 20 Feb 2019 05:19:59 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=WCSw3AAS; 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 S1728143AbfBTNRv (ORCPT + 99 others); Wed, 20 Feb 2019 08:17:51 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:39461 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfBTNRv (ORCPT ); Wed, 20 Feb 2019 08:17:51 -0500 Received: by mail-wr1-f66.google.com with SMTP id l5so24834080wrw.6 for ; Wed, 20 Feb 2019 05:17:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PG/uhxa3b+MdI8LWNjKVY+NfUULqMl2h5FlcRZcEgNI=; b=WCSw3AASv/OptnJzNiemyockTaqni80N6zNMJKR/+vw3EqRU04Ogj4/D3HbrlkJDri 5PHGH4JDK8dqp0IXFxSDo4arR1JrEHbPnwlgfQIUX0cN+czr72a260AjdCTK3ZHBHLhk IwVIc6vAcqVP7ZBuqeyJ1cz9LMlC7zXNl3DEM= 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=PG/uhxa3b+MdI8LWNjKVY+NfUULqMl2h5FlcRZcEgNI=; b=lbj+e6p7HOLvb95b3X69Jt99kac3ipl4XlbusUae8il3QFyr0o7SRZNvu00CgptIkS tce+0uAMTGe6K49z5dmwuMJ8cLnEY0cUX97drjHjSMq0Kj+JstGNiutdPMdogMEFmvG3 3Ig6vuOJElL70zakiVRvB9BZ0VjYGtXWxGxSYPwK1MkmV1WYL55Q74Dx7I1L9M/+4z4G nf4x77EF0BERhb7sOHdu9bl6c3PTTPSTUvXR6VZJJlHwJB4xt1uF7OhB8vKxqLl/G0KC EO/yim7Qn+9wY+6eEetxNxyi7//ahsidy9iV6RLqhTZjvOgsQ6+tL+30ECcXOUJ31aRn AksA== X-Gm-Message-State: AHQUAuYfHlEyunugu82YkJ3SQ3Truu74YgTjMapcL6AeYbBew0qTDC9l 4UTsPVS1gai7dGUdH8v5yuPgJQ== X-Received: by 2002:a5d:4ac2:: with SMTP id y2mr23230853wrs.98.1550668668988; Wed, 20 Feb 2019 05:17:48 -0800 (PST) Received: from andrea ([89.22.71.151]) by smtp.gmail.com with ESMTPSA id n2sm31862655wrq.58.2019.02.20.05.17.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 05:17:48 -0800 (PST) Date: Wed, 20 Feb 2019 14:17:30 +0100 From: Andrea Parri To: Will Deacon Cc: Peter Zijlstra , "Paul E. McKenney" , 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: <20190220131730.GB3215@andrea> References: <1550617057-4911-1-git-send-email-andrea.parri@amarulasolutions.com> <20190220020117.GD11787@linux.ibm.com> <20190220092604.GD32494@hirez.programming.kicks-ass.net> <20190220095659.GA17578@brain-police> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190220095659.GA17578@brain-police> User-Agent: Mutt/1.5.24 (2015-08-30) 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 09:57:00AM +0000, Will Deacon wrote: > 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. No no, I did mean dep (= addr | data). As you remarked, control dep. aren't going to work here. I expanded on this in my reply to peterz. Andrea > > Will