Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1998795imm; Tue, 10 Jul 2018 11:19:42 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf0IwYgZxjfY7boFQVCg0cIfeH5knLbmRyoDB8gaKDSb46EcxTJwiLhK5+1Wmfkc8UIWGSr X-Received: by 2002:a63:db05:: with SMTP id e5-v6mr23533858pgg.152.1531246782689; Tue, 10 Jul 2018 11:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531246782; cv=none; d=google.com; s=arc-20160816; b=gZgVac/ypkbs1UdbDHLs8sjosFl7EcQtxSrlq1kVOduHakqeWaSUNG9zVCFMvz+Y7t 9iyOYNmsy84utlTzQAdpp4O8bkntW0IBfjzV5CgHC8UtxcqQHsmOBBU3llFH9krUOIg8 n63IjWJXgFyLDS+mL0KZYmKzRUie42V1+EGS8snKmdDOYK8G5pIAe97d3165SkrWy7yP Xoy0rndULyUS+1oh6E1K1Z7mNFDMHPztqz9kfdyrsnPZTJQJK4yHS2XkHlIeBkpCpndC dEdK45crMF376txZCuwGqfppkfx8X8OOUYY3/RKvA1QWOfOBmDM+ogd8x7v2nB+/iSP5 yRQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date:arc-authentication-results; bh=1djgSm9wahONrKWop8XtsD2Qph/vJjS4KyN/01uZU8M=; b=TAgE8FNVrqVrI33dM8Eq+wWDLaV3BOdDEil/MpZRv+S6QQx3lGU11+l9I1so8vm24j CCpjBQd0cn5bz+wK7VgEF2z1nFjDOP3lC6gKaGUDZO3AR4r3Iv131ygH35VFY8SQ606x ZGGLAOYGr1NbzpCDXC/vEwok299aH/YAF0dx9ebsZa7zNHrSBVt+QhQIviZKYx+WJaqK h3nn4DIENBmr/PTcXpvRCMssBK/WHRsasRLtGKujvfr7JnQPf1uTV6jMpOKYbQ7SfOo7 1qmT3r26EwRGpw2vIWe2zR2/tB1mE5bCzn66mQmTUKDfrbapNG0MGE8YZE7pFd7Kvf0C +jTQ== 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 l63-v6si17188801plb.106.2018.07.10.11.19.18; Tue, 10 Jul 2018 11:19:42 -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 S1732335AbeGJSR7 (ORCPT + 99 others); Tue, 10 Jul 2018 14:17:59 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:34672 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1732205AbeGJSR7 (ORCPT ); Tue, 10 Jul 2018 14:17:59 -0400 Received: (qmail 4880 invoked by uid 2102); 10 Jul 2018 13:17:50 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 10 Jul 2018 13:17:50 -0400 Date: Tue, 10 Jul 2018 13:17:50 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Daniel Lustig cc: "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , David Howells , Jade Alglave , Luc Maranget , Nicholas Piggin , Peter Zijlstra , Will Deacon , Kernel development list Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Jul 2018, Daniel Lustig wrote: > > --- usb-4.x.orig/tools/memory-model/linux-kernel.cat > > +++ usb-4.x/tools/memory-model/linux-kernel.cat > > @@ -38,7 +38,7 @@ let strong-fence = mb | gp > > (* Release Acquire *) > > let acq-po = [Acquire] ; po ; [M] > > let po-rel = [M] ; po ; [Release] > > -let rfi-rel-acq = [Release] ; rfi ; [Acquire] > > +let unlock-rf-lock-po = [UL] ; rf ; [LKR] ; po > > It feels slightly weird that unlock-rf-lock-po is asymmetrical. And in > fact, I think the current RISC-V solution we've been discussing (namely, > putting a fence.tso instead of a fence rw,w in front of the release) > may not even technically respect that particular sequence. The > fence.tso solution really enforces "po; [UL]; rf; [LKR]", right? > > Does something like "po; [UL]; rf; [LKR]; po" fit in with the rest > of the model? If so, maybe that solves the asymmetry and also > legalizes the approach of putting fence.tso in front? That would work just as well. For this version of the patch it doesn't make any difference, because nothing that comes po-after the LKR is able to directly read the value stored by the UL. Alan