Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp717519imm; Wed, 4 Jul 2018 04:53:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe/Z/L15dIV68gPqmqDQGY7RUriYu/WPzG/xczrGE+6SE5MCK5RJ2W9PId5jgk1G84+erds X-Received: by 2002:a17:902:143:: with SMTP id 61-v6mr1783586plb.171.1530705228779; Wed, 04 Jul 2018 04:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530705228; cv=none; d=google.com; s=arc-20160816; b=JUerbtiHigEHkEW1ho2A3pFM9+QNMPgEN4efu1mnJ/j+uz5kw/9IkvogcTQbTuyVK3 r2DyyDFVb5s1gcThKLmHBQHU79SaiLz98dpCXMPIkkuCxhR2wthPJaAYobTWcQLT+pOo kLpkZNx4LEHdhNdSy6K6gtBZU3pdjFjiaGaEfEjC+Z18vZg9oS6aaSbwR+mDAi0TRNHf CoMUECRd13cpCgkQQHJ910Vk81a0SqmwW2b7kZbe2Yuvj5AkK120Kl1DB0W2/4PlZ5Nm +WZF/GxXB/BjAuqs2GXcmuzEiM3qR4ql+eDWDhfXwterX+rwcaDy1M2EMQOtPdK/CINq Rrkg== 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=iJxflTw2NsjsiVDvgQdcaSaWcSwqMLgeUz4awTnFq6w=; b=tqDIYJrDAIPP4iwYohwTU+s272K45HAoBYgME/bmrnq9fQ+zqZuI6wluC7NXaC5DD9 ebeTKPK+Sc8mLcvRQKiRAxiCMeIEckcCqjcbsGUI+rVlfIT0qaxK4F3w+qUPRpVmXrHp meTIkkRZmwXfeiz2pFpDkObN7RGNBwDHBDg+bWWSjU5SR/mt5M8wNfZgpkQkDYEzID6j bklvWwUUlLskM1ZPUH23vjFJEsw4ZjlRIMtli6lHQrAtkIFXqsHy1JbZzrK2soe+JJP/ QYkYei75PXeTpKRK9zT62CNCCDQhGUGV1DZG0Qx+SAQse8ow3+djeqyYnBCB9Q7YfDbA 50hg== 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 w10-v6si3511333pfg.328.2018.07.04.04.53.34; Wed, 04 Jul 2018 04:53:48 -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 S934134AbeGDLwx (ORCPT + 99 others); Wed, 4 Jul 2018 07:52:53 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36174 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933269AbeGDLww (ORCPT ); Wed, 4 Jul 2018 07:52:52 -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 3FBD718A; Wed, 4 Jul 2018 04:52:52 -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 1005A3F5AD; Wed, 4 Jul 2018 04:52:52 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id F20401AE189D; Wed, 4 Jul 2018 12:53:31 +0100 (BST) Date: Wed, 4 Jul 2018 12:53:31 +0100 From: Will Deacon To: Alan Stern Cc: LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , "Paul E. McKenney" , Peter Zijlstra , Kernel development list Subject: Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks Message-ID: <20180704115331.GA26941@arm.com> References: <20180622183007.GD1802@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 Hi Alan, On Fri, Jun 22, 2018 at 03:11:37PM -0400, Alan Stern wrote: > On Fri, 22 Jun 2018, Will Deacon wrote: > > On Fri, Jun 22, 2018 at 02:09:04PM -0400, Alan Stern wrote: > > > On Fri, 22 Jun 2018, Will Deacon wrote: > > > > Could we drop the acquire/release stuff from the patch and limit this change > > > > to locking instead? > > > > > > The LKMM uses the same CAT code for acquire/release and lock/unlock. > > > (In essence, it considers a lock to be an acquire and an unlock to be a > > > release; everything else follows from that.) Treating one differently > > > from the other in these tests would require some significant changes. > > > It wouldn't be easy. > > > > It would be boring if it was easy ;) I think this is a case of the tail > > wagging the dog. > > > > Paul -- please can you drop this patch until we've resolved this discussion? > > Agreed. It sounds like we'll need two versions of the Rel and Acq sets > in the memory model; one for RCpc and one for RCsc. smp_load_acquire > and smp_store_release will use the former, and locking will use the > latter. > > Would it suffice to have this duplication just for release, using a > single version of acquire? What would happen on ARMv8 or RISC-V if an > RCsc release was read by an RCpc acquire? Or vice versa? On Arm, RCsc release can forward to an RCpc acquire. We don't have an RCpc release instruction. Will