Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp7lqb; Thu, 23 May 2024 09:06:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVE0Dxo8ESE2/bvklT6p/pHudJhEpO7dkHzoNZVQPZ4NsngqmIwSwAP27R9JlmsuSNP1840ocAz0XElIr5tXEkoeORqIm77dubSF9WJMA== X-Google-Smtp-Source: AGHT+IGfoYqgxrp/OD2oifFOtZUepUHB38sGXhdfu+P7gBOwfgV5x8Lv7a+ySZIs4xDfhGcZzZSM X-Received: by 2002:a05:6902:523:b0:dc7:497e:cddf with SMTP id 3f1490d57ef6-df4e0c2b3efmr5139718276.33.1716480401541; Thu, 23 May 2024 09:06:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716480401; cv=pass; d=google.com; s=arc-20160816; b=B9zQDcQdJ4VfwFYf13/U72tB+0g7tqQAhv3bEzQmm0tZqU9NYoMvwxMrddsbmOkTmO savk/cIdc4EqO3fHcMjsLT3fDDK82S6Ko515/cXyHyhmB6MCHGgN5LRSfG7zchtmbPWr XCoN7bjIUBKNxp4jVb0cQDEeIXuq6Ny5MuA3/1czVhcRTnL99Y9JJ7UkDIF8N9q9Div3 qs1WTHSFCqmaT/YIh3b94ugtiqOOctkxgWquhmDOXXvNov3I/v4HpMjk7Ttazx9EShPI e5QRw+fSW08cb7FU2yrBRl+E06914CFe8Duylt0CfJ7ZjcDB86kwO54gAlTTz4enn/Tc yYFQ== 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=ooflA3X3ipek2P9APZ5AvAyrN2chX1CjggZBHRMrv1w=; fh=KwF0lt7ozO/MaV6TZMLfzUIJn/6nY42D4G5d2ONBRc8=; b=WprwOM1DE/WTw88O9cZ0TAT9+esqVi922fv1oJV8PNd52SYTfk/AtTAg5DNCdIJcHK gdDG6PuCdZ7F5/ybebXUVkDIQaeLo2fie7rGchKQJUpwU8w6z2WNtMwkGZRjdGJCo4iA TJhoSuFLR8fqWSmJJSDYKK+/ik0dEFXog4vTM9eU7QcpGyRLb5vkN+jRBggb38LS5pWb 8CEduENaapQomP18EVtgLpbKK62ZeAVOwZkela+siPi7gb0zFNKtkVTIwnJWXOUSyrh9 vYrYSp3xglsXBeSU88tza5DcbWtg1k0ye4pmSsId4BoiQSh2UhwBGIOOfS+6C2aZvnm1 0nrg==; 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-187772-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187772-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 3f1490d57ef6-df76f343ad0si90032276.673.2024.05.23.09.06.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:06:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187772-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-187772-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187772-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0541C1C20BB2 for ; Thu, 23 May 2024 16:06:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8088F179AD; Thu, 23 May 2024 16:05:59 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 4FD70125B2 for ; Thu, 23 May 2024 16:05:57 +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=1716480359; cv=none; b=oziBeJnixmkRYwumQSuIVu41dmbCLZWxc1BZ/IdbSHsCbGkZBR7QBbeowyNqXL//RX6EOyHkJ6Uj30OlfgpHD4H++fhQQBJn9n76ZQgDu21qq+hOCa96TVZYATX/9/c7CciAlz+totuACBh7SOWbsNm7LBHGa3jo31BsKCNmI+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716480359; c=relaxed/simple; bh=FAOMe+aep0lPGuVjWYzGeu3BN1Pr/SLhZKdfHzZPEiQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YSyZH1KIB2w2r2qd00TkYTwZ9BavYgfC9rCtud3pWqoq/l/Oq7bRE1GuAUjd/1sLdKIlGiemIWgIZJ3kLmijmVReh+b6dgEykOZ06/mYMmzp/wDm06qamKQogFNkz1pi8CUjQ6c7IPY3EDDj95ygQHK0Ltca36aC8amH7y3q0t0= 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 542996 invoked by uid 1000); 23 May 2024 12:05:52 -0400 Date: Thu, 23 May 2024 12:05:52 -0400 From: Alan Stern To: Hernan Ponce de Leon Cc: Jonas Oberhauser , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, kernel-team@meta.com, parri.andrea@gmail.com, boqun.feng@gmail.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, Joel Fernandes Subject: Re: LKMM: Making RMW barriers explicit Message-ID: References: <2f20e7cf-7c67-4ad3-8a0c-3c1d01257ae4@rowland.harvard.edu> <0c309dd3-f8c1-4945-b8f1-154b2a775216@huaweicloud.com> <4286e5b2-5954-4c77-a815-c1c2735d9509@rowland.harvard.edu> <58042cf3-e515-4e5f-ab48-1d0d6123c9e9@huaweicloud.com> <6174fd09-b287-49ae-b117-c3a36ef3800a@rowland.harvard.edu> <7bd31eca-3cf3-4377-a747-ec224262bd2e@huaweicloud.com> <35b3fd07-fa85-4244-b9cb-50ea54d9de6a@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 Thu, May 23, 2024 at 04:26:23PM +0200, Hernan Ponce de Leon wrote: > On 5/23/2024 4:05 PM, Alan Stern wrote: > > Overall, it seems better to have herd7 assign the right tag, but change > > the way the .def file works so that it can tell herd7 which tag to use > > in each of the success and failure cases. > > I am not fully sure how herd7 uses the .def file, but I guess something like > adding a second memory tag to __cmpxchg could work > > cmpxchg(X,V,W) __cmpxchg{mb, once}(X,V,W) > cmpxchg_relaxed(X,V,W) __cmpxchg{once, once}(X,V,W) > cmpxchg_acquire(X,V,W) __cmpxchg{acquire, acquire}(X,V,W) > cmpxchg_release(X,V,W) __cmpxchg{release, release}(X,V,W) Right, except that the last two should be: cmpxchg_acquire(X,V,W) __cmpxchg{acquire, once}(X,V,W) cmpxchg_release(X,V,W) __cmpxchg{release, once}(X,V,W) Alan