Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3647909imm; Mon, 25 Jun 2018 02:08:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJkoK4y0vA+y/oEWu9rg/ZVAeiGv92YcGOH0eriib5eumh+mEit3UegiMhvwH2Q1grxUogV X-Received: by 2002:a65:58cc:: with SMTP id e12-v6mr10068593pgu.445.1529917696630; Mon, 25 Jun 2018 02:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529917696; cv=none; d=google.com; s=arc-20160816; b=IRKowjG3plcob2b2hArPiA3qcHRX+0fwUjzvJwUPVnCyE9yspJ8UcAIddORCtvwLoz +fqjTGeQ7XSBjXs2r818xX3YSvCfllULgxJZnASPpZQuk4BPltYJHW9pTHHU3SFSvu9s Bc/ZdeoCSP+aVcNSfI5bpfL5CCgL80NQ5Q3025PCtgan+ImpgZNmyFg6P3X7sRBdN7Is 8/lRDkFGYrKmCwzVJ/VCXgoCuXIuLd9U5M2l85Hdm4tVu8GjLj8CiazanwQq3MEe1CWz i4Ri54oQTIp80kzqeKBs/x17PKrSGarazZGR3mZqyjXv4kRN3AohMcV30QDAbCBav7q3 T/2w== 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:arc-authentication-results; bh=4Q95/j64975IV+y3PIEVFy5E+apTPR6EQZ40gLnVXvI=; b=0lxq/O8yb+HmMa66kAM+d1/5ZERbl6fTamt0lhYle6Hlwlw0rkrd5hqn3mE095nhbr gm9S0hJkZgKqgu4ncyRnjSN5pgvf/gTv6IM2Mf0H85MOGJKC/S1c5qOvak9DL1fjgu6d D4TKcXh6p1tc3rQQx3Xqq3IJ4Ui+422xdLQB9JuOctnbvMKlS/YASjaABWXpdqpOe5Tg NX0MLGRLn4/KWev/07yssWrvK1CpkI5mc0oU8gblfh067Rx7deStnACe2jVDXJLabI92 oh793nfaxU82OjG9Q/GvH3fNNhVC+YZjeQo/jS1EA9YMZUdYrOhEKpg+B+VOvmI38IVf Ot2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J+FK7oqO; 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 l192-v6si4390309pga.120.2018.06.25.02.08.02; Mon, 25 Jun 2018 02:08:16 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J+FK7oqO; 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 S1754797AbeFYJHF (ORCPT + 99 others); Mon, 25 Jun 2018 05:07:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42328 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754537AbeFYJHD (ORCPT ); Mon, 25 Jun 2018 05:07:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4Q95/j64975IV+y3PIEVFy5E+apTPR6EQZ40gLnVXvI=; b=J+FK7oqOs4GzWXGD1lO+LLozw +fGC4sTkLsthLUs+ANfBbqam8emQhsqlUjlg3EzTW5+xwLKAkSIACKn7Q59jQyGhmBcdC/DF7RNNr EZWe6eYn7xCf3Jgcg1pVoGE3WA6eLlpDsTC95PtqledEYnI1w0vj0LuuNBjsCgbAxXSexUj8O1VGj poB4B9JT+MyQiJwnu+b+5Fba1AOwcz8apDIpAf74NhXwWxIrCAgHEbmBalxPWDTFCZX/S0BG3rUlY ASaVtKC64lmGouKQ35WogCk3BZ69lgBy5VPfhBnhElX9LSBU2ZSb0Qg2Pf7FvSW5aQfaYEDGqlSv9 dFsN4XTRA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXNSU-0001NA-AT; Mon, 25 Jun 2018 09:06:50 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 62EF42029F1D9; Mon, 25 Jun 2018 11:06:48 +0200 (CEST) Date: Mon, 25 Jun 2018 11:06:48 +0200 From: Peter Zijlstra To: Andrea Parri Cc: Alan Stern , Will Deacon , LKMM Maintainers -- Akira Yokosawa , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , "Paul E. McKenney" , Kernel development list Subject: Re: [PATCH 2/2] tools/memory-model: Add write ordering by release-acquire and by locks Message-ID: <20180625090648.GU2494@hirez.programming.kicks-ass.net> References: <20180622080928.GB7601@arm.com> <20180625073229.GR2494@hirez.programming.kicks-ass.net> <20180625082923.GA5808@andrea> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180625082923.GA5808@andrea> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 10:29:23AM +0200, Andrea Parri wrote: > On Mon, Jun 25, 2018 at 09:32:29AM +0200, Peter Zijlstra wrote: > > > > I have yet to digest the rest of the discussion, however: > > > > On Fri, Jun 22, 2018 at 02:09:04PM -0400, Alan Stern wrote: > > > 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. > > > > That is problematic, acquire+release are very much simpler operations > > than lock+unlock. > > > > At the very least, lock includes a control-dependency, where acquire > > does not. > > I don't see how this is relevant here; roughly, "if something is guaranteed > by a control-dependency, that is also guaranteed by an acquire". Right? ;) Right, you are, clearly I needs me a wake up drink :-).. So lock does very fundamentally involve a RmW, and it has the whole wait-until loop thing in. But yes, now I'm strugging to better express how it's different from a memory ordering pov. But still, the lock case will/must disallow the re-ordering (since we rely on it), whereas the pure acquire/release seems to be struggling. Personally I prefer a stronger model over a weaker one (as does Linus IIRC) but clearly people have different opinions on that.