Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2664126lqb; Tue, 28 May 2024 07:01:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU29gU2+uhp6zrNVY0maRN2AP3UNPYaXqTjoXUMW8ogo6T/a3qOzSP+Bm9XOmiCOx3ZWNnkeCys9lnSptCnLLF7OJaExiaB3lEUUhE7SA== X-Google-Smtp-Source: AGHT+IEMyRJNn5ELMGFroYE2otXyFSDgmd3wA9Qjogrtealob8M/TsCkAHiNckzRQ0G249XcKJLq X-Received: by 2002:a17:906:3946:b0:a5a:6c0e:90f7 with SMTP id a640c23a62f3a-a62645d6e27mr781475766b.42.1716904876680; Tue, 28 May 2024 07:01:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716904876; cv=pass; d=google.com; s=arc-20160816; b=tSYSP5Mi6cXtSByeF1M2KL4PorfSusgzlm5vAIPno4rY6nht0mzqcFdAuWzA9eK+rp edNEs3Q9xNO6EFnFEVuYwrrvqEesE5NCyoPEF3FNOImvc3TWAsSqDqSM6X06eUlWMyKi Z/XUSbY6dfOoAWZnnNHaPRW6KbNaFqsQXu9EivYTbx7RedBbEowPnwhZCqdeS9ND/xn7 IfFsidFwJo+GiGQvuUGjYwsNvhdaW6bGxPxX8TipwselGyAffkCAdG3TPIab/geo+MsU GtrKgHZu8hrSg7wKNKX/unabr2wep7CZNEbQcgXYwCIVkyFlitNVp/Xf0RtLvT8DwWSe 2iqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=PO3nltU+DK1PWKpXIKNGooEsu0olS+NxV4nJMUUTjj0=; fh=R0a5vNVEbT85ZdnMMJAnpaJPftamlY5YBzL5BPBNIKs=; b=ORsPOa5GpbGz7yt6E911ZfxmyQCvkvSCm/5FjVuud/yvUjlVBwuqmwaYKO99yxZLOK 3E20fZeSOajXLAWfwJcf9rpThN3D8jS4NrUFFTHAZGS1iA2Um+efQj97iW9qBRyuN7WL +UaXVbP4eSgOx9mFmP1BxJ+vlOnPk92cT5WtMfuggw+JvMbF1S/rsBQmNLm97ig1egUd 6TZRY1LkJ9XpiPWw9QRh7+ZF60hguPHrvX38GKNcx6PaSvLmlxgpPOjxrHjCUDvI47z+ o+mJyulPOKCf12f9c9kSiE5ZyWnVEiTMqp15jkkGOO4aeKupK5aKML0dYDWaIxgk5mB1 IWXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-192482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdd1c66si497054566b.941.2024.05.28.07.01.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 07:01:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-192482-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192482-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 68E851F22EDB for ; Tue, 28 May 2024 14:01:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5E7B16F293; Tue, 28 May 2024 14:01:10 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 4790E16D318 for ; Tue, 28 May 2024 14:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716904870; cv=none; b=EqEP4VdzZM9BP0U/1j/jWtMpHTp56bX+vkmz1E3V8hfiTxicPEoXArf3Y2Oze62cC8130OoXi6jBYNkjKp/34bm0q56VL0T4KVunH6uLPoFHdouL/HNQUst0IWYhe6stBdZYqSnRihm6d9+EGgpf6gMxCg6Gp3jvOLiGNzRHn3o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716904870; c=relaxed/simple; bh=qeyOjL/52tnllRKfWs0Wm3xoH3SnaQ0fiYrsAx0iLNI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gG2NEbsGiwQ3P795ZlIYaRzOfRI6puN8d3lx1U9qvwHmy+0iWvxLv1vUADpbTma9QCHA5nqkMT+w7O0hhEx8x2NBPwBp7Sfe3/i00+GPlecEMHWYsoroHg53dzwJOjURd7FQWRW+yma0BJ1z8fe80GflowyA1AWa8AfRfHzVC7E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 688704 invoked by uid 1000); 28 May 2024 10:01:01 -0400 Date: Tue, 28 May 2024 10:01:01 -0400 From: Alan Stern To: Jonas Oberhauser Cc: paulmck@kernel.org, parri.andrea@gmail.com, will@kernel.org, peterz@infradead.org, boqun.feng@gmail.com, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, urezki@gmail.com, quic_neeraju@quicinc.com, frederic@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 4/4] tools/memory-model: Distinguish between syntactic and semantic tags Message-ID: References: <20240527152253.195956-1-jonas.oberhauser@huaweicloud.com> <20240527152253.195956-5-jonas.oberhauser@huaweicloud.com> <5ce0c8a3-bd9c-475a-9427-7edef47a90f2@rowland.harvard.edu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 28, 2024 at 02:49:38PM +0200, Jonas Oberhauser wrote: > > > +let Mb = MB \ FailedRMW > > > >> (* Compute marked and plain memory accesses *) > > > -let Marked = (~M) | IW | Once | Release | Acquire | domain(rmw) | range(rmw) | > > > +let Marked = (~M) | IW | ONCE | RELEASE | ACQUIRE | MB | domain(rmw) | range(rmw) | > > > > The new MB term isn't needed, because MB tags on memory accesses are > > filtered out unless the access also belongs to domain(rmw) | range(rmw). > > > > Alan > > > Thanks for all the notes. > I think on this one is needed though under the assumption that herd7 would > no longer know internally to replace the MB with ONCE in case > of failure. And I was wrong because failed RMW instructions are filtered out of Mb, not out of MB. Hmmm, this raises another question: Shouldn't the R event for a failed cmpxchg_release count as marked? At the moment it's not clear how such events will be tagged. Perhaps the best thing to do is add RMW to this list, which would make domain(rmw) and range(rmw) unnecessary. And then we probably don't need to keep MB -- unless smp_store_mb()'s definition ever gets reduced to __store{MB}(X,V). Alan