Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp819280imm; Thu, 5 Jul 2018 09:23:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpekHLtam8Hi2bI+iQnpPsa454kZTZ+J2RYeY8ik3cXQ5J+T/3PxLWHLg0GWV24yN1YQRrGJ X-Received: by 2002:a62:138c:: with SMTP id 12-v6mr7232143pft.34.1530807798974; Thu, 05 Jul 2018 09:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530807798; cv=none; d=google.com; s=arc-20160816; b=z5ySmNUHMqwtO/dnN0gR2zxQCzVcsx2rwe6+JLg8N/lTc5DDjs9OdgR/3Fgw/1EeGl 70P0GX/Zvj7xHMas6maVSrf8HJpGjnKXsfmGqO54xY1esglUQ7AUPW0IvoKaiDsBqv1Q bx29/mj6tPEa/R9Zyjlhn6/8cNKhKkUUs2ufVQpqTGWtP/1Ofhc4lC+hPhQSstrooxU0 nUhQIRsJsq5zVzXBfKsz6rbkdwD60l6mYF264Rt88wPtfhAROrujd3XdcbfVcYkISOlY qg1nL9zHcVh9qmhPVggRjRpb+DExmy+fj0ZoqU09bCeC3bzrfKwWvCfNrZLWK2VMexpo lmqQ== 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=rNoMu2C2/uMLpyoz3f1gLC5BOM5T40OW30QOthDw45k=; b=XY7L61ig307Dxe8T+DWCFJWQ4GcIEe0UlQpijyziRupTsjRMCjiYjTzZJ5hEKf6o0A 52mwRGdZg6/cjIMHBMz28TNrQW23smUNPEeZP9msGy8mFBCij+xqSSjyJkx4u/7ke2ji 0EA+47uK+0wlhL+RW34DVTOo6AbqlB6nDOfNKtFABF2qrS8PQzn1SEyNF/JokPsx0iec Nml3M9nctKnB14kGn1XjxiK1y30VaXZ/8oEd3jwgyYaIbfNiO49110Jp/T+zc1Rz6GOS nlvipLcafya1AdkJqm1AhxlnjKAB9hVOCTSvh9zHkEu28cDdGZ++Jkt5SkzqlvRUOvpe T88g== 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 b23-v6si5976961pls.341.2018.07.05.09.23.04; Thu, 05 Jul 2018 09:23:18 -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 S1754341AbeGEQVr (ORCPT + 99 others); Thu, 5 Jul 2018 12:21:47 -0400 Received: from foss.arm.com ([217.140.101.70]:52886 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977AbeGEQVq (ORCPT ); Thu, 5 Jul 2018 12:21:46 -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 551EF7A9; Thu, 5 Jul 2018 09:21:46 -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 2611E3F5BA; Thu, 5 Jul 2018 09:21:46 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 6C5C41AE3638; Thu, 5 Jul 2018 17:22:26 +0100 (BST) Date: Thu, 5 Jul 2018 17:22:26 +0100 From: Will Deacon To: Daniel Lustig Cc: paulmck@linux.vnet.ibm.com, Alan Stern , Andrea Parri , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Kernel development list Subject: Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks Message-ID: <20180705162225.GH14470@arm.com> References: <20180704121103.GB26941@arm.com> <20180705153140.GO3593@linux.vnet.ibm.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 08:44:39AM -0700, Daniel Lustig wrote: > On 7/5/2018 8:31 AM, Paul E. McKenney wrote: > > On Thu, Jul 05, 2018 at 10:21:36AM -0400, Alan Stern wrote: > >> At any rate, it looks like instead of strengthening the relation, I > >> should write a patch that removes it entirely. I also will add new, > >> stronger relations for use with locking, essentially making spin_lock > >> and spin_unlock be RCsc. > > > > Only in the presence of smp_mb__after_unlock_lock() or > > smp_mb__after_spinlock(), correct? Or am I confused about RCsc? > > > > Thanx, Paul > > > > In terms of naming...is what you're asking for really RCsc? To me, > that would imply that even stores in the first critical section would > need to be ordered before loads in the second critical section. > Meaning that even x86 would need an mfence in either lock() or unlock()? I think a LOCK operation always implies an atomic RmW, which will give full ordering guarantees on x86. I know there have been interesting issues involving I/O accesses in the past, but I think that's still out of scope for the memory model. Peter will know. Will