Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp63128lqr; Tue, 4 Jun 2024 21:26:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU9NbUZQEWcj8FxNZ3AXCZArj3G3Mt2H3fjk1pRM/H7XekuR6PL2JkxNP1UBJtwJ25HPuk6+tyl8cN6uvbW2/IkyWuExi72t+pZ7tIdJA== X-Google-Smtp-Source: AGHT+IEQA10N+bNh6lk11R1LLY8w0RI8mtHd0otAuoQmbT7ILu8Ke3Y2kmgnPdhY4rI2XmVTzLfB X-Received: by 2002:a17:906:5fc4:b0:a59:bae0:b12c with SMTP id a640c23a62f3a-a69a000e25dmr88046766b.48.1717561564514; Tue, 04 Jun 2024 21:26:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717561564; cv=pass; d=google.com; s=arc-20160816; b=u6DfWL02kMEf1a4ctIQCM/5SWmHn8ABMbkvWJoqZ7FCYZAzg/h7cNdgpcHpo0Bz1vx i/IZmggvQc+/P/+TYiVjenbY384eYSextbnVTBTxkgxO8Z1ZlnmHwCWM6ehq8OIK2oaO 9eWwhwX2FScffbHl+JHAGjAzu2HIFcWYIE67+WybatJ2caqz2vWaUdzOHdulLkkvu4/f kBc0T617qhKWvi9Tbabv1Pmi8ijWXvrXLq88Nl6I8YW9M+EZXQ6XFFKREaNgFbsuSctk xHSS0gHVAb/gyKs7/ulOstzi91SlkOUfWkvtsxF9CnUO+Jo5IuUPq86Y6OoUedA1nIJV k+OQ== 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:feedback-id:dkim-signature; bh=VEbQ1d4r/s6evsOJRL2N+n6Aljt6mp5bELQcUaKfVp4=; fh=Elu0Qwu67NhqznIX0zqbwPO9jLpKTh+WT5AzpEOwkM0=; b=Cti41Oo1cs6oYMcZPSrqiFUd/XiYtG6EQVmshiQhU+Fq3OZ2f2IjxJPd8IaX4aGaMa UEup3US09O32NlNnOfaPd4M0S3xRl6H6ifmjJtiwO11Z9UIFiWnIm/3+N2k66bkSCoXB 91Yv0YojixRvHOXCgcViuXiqsxt5Adur3DxWyrhbIv6PfEjT9wotwV6Pv4aV/Yc3SQHb ZbEX5po5f9gCJR7U+3RHLISkrioQy4Q4toli/KF+fUAQBM11KMcO/6CvtacAr8B8JSlz Bn4Eab7C1i89M91EIsBh+GBHD3s6hW8/URf2B63wRSSSnHheKqSJUwUVKIoEuf6cAXei Z6sw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nUZVK7tI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68a408ee99si469079466b.198.2024.06.04.21.26.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 21:26:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=nUZVK7tI; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-201746-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 045731F23987 for ; Wed, 5 Jun 2024 04:26:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D3C6131E28; Wed, 5 Jun 2024 04:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nUZVK7tI" Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF87660DFA for ; Wed, 5 Jun 2024 04:25:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717561548; cv=none; b=SfcqFfm0aaZIUxJY4jrZR15ZbnT/It4XjcEd7bWvlQ/IR93OCMs2Wj1NDUVomwzabyHEZmN8xwf0Hv2mv+lB7RhFmvfUDdpCebbN6mkEdODZ8AU+7gwoNFra3X7driLOiWa/mDYoIINF0aOQSEnQ6EJC761sSU2PQJuib6OmvFE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717561548; c=relaxed/simple; bh=g/5YMCb42qtGxp7osr6jvhFln2vqs6thuDpQEioZH94=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uA5aimz9X4UAAGzT7e5BgOgCpYPMbAzXpDuX5fhJ1iaQuHm1wXlulcZceEXy/2AThvam3KKhEB81y8/+RELOFXIiXkitFqkthuaShfOXPj47m5fFfVAF5O/EhuO9uC3B/vnK4ptiWxLMdzWGwpDr2Wutb1mudLpmbrP/986+beY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nUZVK7tI; arc=none smtp.client-ip=209.85.219.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-dfa48f505dfso6423204276.3 for ; Tue, 04 Jun 2024 21:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717561546; x=1718166346; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=VEbQ1d4r/s6evsOJRL2N+n6Aljt6mp5bELQcUaKfVp4=; b=nUZVK7tIkCttMQXjBFq1p327Sw2hzfkGiqR5inY9rLvilPOBXwdu673xOjCcLE3muj fiIJ3y+xBsG9wAOQgGywrrjb3GQiTgt8K8GoH09MoV9TlLtNJ6ZFGimPCEO0KAvIQUIq iF6Bp/hKuzmOsntcdbVB1Q476y1x8u8sP54OVnddnphgBqq9ED0EaWL7jga9rpI4efBD 7dPd6QgYX3eDuj6z3XQMXdv/jLRRn2ZUN33b05CssaIf1k/QMQkiXOI6iupf/WzzoOQE /llkGdcEwiZ/Ef5sbhAp8gz2nERCNexmuQZiamdEwaMvFWoWly06vYETtSPUlf75hv66 7XJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717561546; x=1718166346; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VEbQ1d4r/s6evsOJRL2N+n6Aljt6mp5bELQcUaKfVp4=; b=sQ3nWI/5/PxWwqo3Lx81hvMSIHoxRVHwCbtgdUhn3QMWgS0eLogVPWwIMFONDg5QfO gxbFap5mCdO3aj28OLnWKPTX5q0uxSCmt0RsIo6fEIUaM3XLfCp58HBY/7ghCyk72w4X eze3HZHY4gVOX/rT79zm/pu1vczOWILOsjIUdEyHvJTeNGAwreyxuvH264C6jMxOGSLx oIS8AsZ3sziG/wfQ6NEr96cxXDJIoIbGGKOXVdDvAFN3zO5S7RQ91T1tPQfnfnLY1NIV 111NwEbaEcuU24lmsGoZdaJN1I9RrmdcoqqGSdAOcjK3UexF6lqUKIpb8jP1To7dqbt7 8NdQ== X-Forwarded-Encrypted: i=1; AJvYcCXMxd08PAjHLKfJ913LXD2mjbMruTQ39fLgGr07FquMjrHUVX45nfjLK05FLQ7OEL/YJuLiX+MkHslYUi34Hx1UcvvkzGoXkju2pgyb X-Gm-Message-State: AOJu0YxUz4rDVFHAu6oTWLjYqIlIKlvu23UqML3Oo5Mn8tPfLZCq1DRR x/Az3XQURCqxbhMpRw1KRdaJGXIdwmrzatV8FylUc1E2xw5nLhIk X-Received: by 2002:a05:6902:248f:b0:de5:5506:5213 with SMTP id 3f1490d57ef6-dfacab2a23dmr1639410276.11.1717561545749; Tue, 04 Jun 2024 21:25:45 -0700 (PDT) Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6ae4a74ffc0sm44671916d6.58.2024.06.04.21.25.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 21:25:45 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfauth.nyi.internal (Postfix) with ESMTP id A50921200066; Wed, 5 Jun 2024 00:25:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 05 Jun 2024 00:25:44 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdelhedgkeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeehudfgudffffetuedtvdehueevledvhfelleeivedtgeeuhfegueeviedu ffeivdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvgeehtdei gedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhmsehfih igmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 5 Jun 2024 00:25:44 -0400 (EDT) Date: Tue, 4 Jun 2024 21:25:42 -0700 From: Boqun Feng To: Jonas Oberhauser Cc: paulmck@kernel.org, stern@rowland.harvard.edu, parri.andrea@gmail.com, will@kernel.org, peterz@infradead.org, 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: [PATCHv2 2/4] tools/memory-model: Define applicable tags on operation in tools/... Message-ID: References: <20240604152922.495908-1-jonas.oberhauser@huaweicloud.com> <20240604160409.498190-1-jonas.oberhauser@huaweicloud.com> 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: <20240604160409.498190-1-jonas.oberhauser@huaweicloud.com> On Tue, Jun 04, 2024 at 06:04:09PM +0200, Jonas Oberhauser wrote: > Herd7 transforms reads, writes, and read-modify-writes by eliminating > 'acquire tags from writes, 'release tags from reads, and 'acquire, > 'release, and 'mb tags from failed read-modify-writes. We emulate this > behavior by redefining Acquire, Release, and Mb sets in linux-kernel.bell > to explicitly exclude those combinations. > > Herd7 furthermore adds 'noreturn tag to certain reads. Currently herd7 > does not allow specifying the 'noreturn tag manually, but such manual > declaration (e.g., through a syntax __atomic_op{noreturn}) would add > invalid 'noreturn tags to writes; in preparation, we already also exclude > this combination. > > Signed-off-by: Jonas Oberhauser > --- > tools/memory-model/linux-kernel.bell | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tools/memory-model/linux-kernel.bell b/tools/memory-model/linux-kernel.bell > index dba6b5b6dee0..2f49993644ed 100644 > --- a/tools/memory-model/linux-kernel.bell > +++ b/tools/memory-model/linux-kernel.bell > @@ -36,6 +36,13 @@ enum Barriers = 'wmb (*smp_wmb*) || > 'after-srcu-read-unlock (*smp_mb__after_srcu_read_unlock*) > instructions F[Barriers] > > +(* Remove impossible tags, such as Acquire on a store or failed RMW *) This comment needs a bit help, "failed RMW"s still exist, they just don't provide ordering. How about: (* * Filter out syntactic annotations that don't provide the corresponding * semantic ordering, such as Acquire on a store or Mb on a failed RMW. *) ? Regards, Boqun > +let FailedRMW = RMW \ (domain(rmw) | range(rmw)) > +let Acquire = Acquire \ W \ FailedRMW > +let Release = Release \ R \ FailedRMW > +let Mb = Mb \ FailedRMW > +let Noreturn = Noreturn \ W > + > (* SRCU *) > enum SRCU = 'srcu-lock || 'srcu-unlock || 'sync-srcu > instructions SRCU[SRCU] > -- > 2.34.1 >