Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp820950lqo; Wed, 8 May 2024 16:47:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVS+3nHf05UfF9YH/mYal9F9vvCFa6x8fAgw3k6KyoZoTPzM06hrgodpYFE9Yl/ePo02+VAOZorgfWG0PrgSYFdv6v1ntwEHtO0Dt9XBw== X-Google-Smtp-Source: AGHT+IEpYvwbBAOQF/LsEu/f7B1qYOA6cQW8t8SoXIosqk7jXmfaHS4asHpkVgQhv8A6ni2NPGfy X-Received: by 2002:a25:b111:0:b0:de6:1b1a:f0aa with SMTP id 3f1490d57ef6-debb9e2aee6mr4305206276.42.1715212027811; Wed, 08 May 2024 16:47:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715212027; cv=pass; d=google.com; s=arc-20160816; b=q0QXJJLtzxLo0//lFPiqx2+OGDF1yc2dtl6OgVW2/OD9NZ339ry554EBore+fRmvQq HZJehumve0F5rdLPO3qHRrDCbCI7FuJA9JBzusgodejDHFRAKo9QM2Wh2RhhhTbf2f8O AVUU7GVE5LW/54mrIa+ASNf/O5fr6ctLKJnyB9EHkeEfzfxqwvnl1oX2IZjGbvCNL8w7 EbvPk5zE5DOqMjbvDUQqwKY0ztB/V8QgZcseb0BW9qEN05AfA9zFZxQXABd8Ulf8mpJZ 2k95gK0p/fW7uhuxmzg6ASn3r+DKNMbsCEYuESwrvZ0yPVrnvmpqzbCjhSdjpZ81Jxa1 3FNQ== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=ss1Xq3b/KJLVB+f9YphMVMT2UbofeG6M6ifd4tMni9w=; fh=NfnklYOyxjwDXwKbktajMqwjGru6DYhIrcvRhQn9YOM=; b=lDmv7i25DdPTwAQOstTE8l5xhIEei0XAGV8YzFDOm8HJRbuld2MMKlucNt1DahaLd+ fkzOUUTAZ5Owc0EcZ19pdOs2sGv2mFzwt+RjoROJnSUf1y8fG4I5F/xCsIhvS3QxjLdw ICBxnoyxY1L8gCsq7TxatdPNX5qhpwrZHYDOvNC4KLwUFQhiaS66dRpDA82y4iHWReoq 07aFloDDL3XwbaDlfhAlUmJBMFt7qqdP1Y13MaErFatzqoKq3gaVa3nkxSh5uRw4lS7Y EFD6hld5s+hY4zMD0Bz7CzUF9VVGe55U0gaGoFHXoDEBD9Mb7BeFb6woQ26IeEkeSulq MImw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cdAo28jz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56c6434si1736651cf.629.2024.05.08.16.47.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 16:47:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173948-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cdAo28jz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-173948-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173948-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 63FA01C21161 for ; Wed, 8 May 2024 23:47:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6280713340E; Wed, 8 May 2024 23:46:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cdAo28jz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 845D350A6D; Wed, 8 May 2024 23:46:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715211996; cv=none; b=VuX12nza8nxFOLOvKCQxh2zo8yyh0SDU/maDBRw5wsK3UlFwgIknga8zum3pBaPTdYstIu8Cv7p5cQDArupUjuDDe+LGwX4SxUK41AIZ2pxZxvhi6rfWa2WXmARYBsM3tlcGDUHGuK2PAComPnpzPOrT3aVQMnMfbRo3+RJqVXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715211996; c=relaxed/simple; bh=uLNC520rYGqWSAZsi1Qc0GGuHL1W3mmjcZyfxbd53cA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d2YLJt57V4mDYo8W9HD0N+eL94lA8T3UJjr/LZLcIn4FAkUvCjN/ArqKL1w/8HOJ1IYdXy1qciBroGvd2N5mNHtDxRspGAbesLG2aaQrgZTutpuLGyqQqRpt6Nqrxn+l543krFm/yNJHMP+O/bhBfrBVeYrodbd/Hr+uKRuog6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cdAo28jz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09970C113CC; Wed, 8 May 2024 23:46:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715211996; bh=uLNC520rYGqWSAZsi1Qc0GGuHL1W3mmjcZyfxbd53cA=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=cdAo28jzXAqvtxr52DMqMno8HLd+O5OD58tQDpRpn/9HOEQcLTZiIEse9ofNLMe6t aB9Z6bRItWokto34IEH6+evtxLDTANWIWnGpXTw4yLMWu45AJlDfr5jBFBj48YfNiI B2H+1FfFkWFBZR0vecMuJG+L6rknsIwtT5bfWzZO6l7sLVMqxteHPF3LjMP7OHWouo wln1DPsnQkH/KUkSiQBERLxCowFVQNfB2eGZazVCyXfv6jK19M70g63GK7/hY9ih96 jAjIXrqjCNb25mLFjweTM8j13MavBCqmMjN9FVnclB97ZTcaoQMfu1c57XyA0jqJl/ Dig2vbWpMvDqQ== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id ADE9BCE0A6A; Wed, 8 May 2024 16:46:35 -0700 (PDT) Date: Wed, 8 May 2024 16:46:35 -0700 From: "Paul E. McKenney" To: Akira Yokosawa Cc: Boqun Feng , Puranjay Mohan , Luc Maranget , Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Daniel Lustig , Joel Fernandes , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, puranjay12@gmail.com Subject: Re: [PATCH] tools/memory-model: Add atomic_and()/or()/xor() and add_negative Message-ID: <8eaa61a3-4d27-4791-b98e-2a4cb331131c@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20240508143400.36256-1-puranjay@kernel.org> <7e7167fd-cf4d-4d8b-bd83-d9fe8887dbae@gmail.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: <7e7167fd-cf4d-4d8b-bd83-d9fe8887dbae@gmail.com> On Thu, May 09, 2024 at 06:59:17AM +0900, Akira Yokosawa wrote: > On Wed, 8 May 2024 12:49:57 -0700, Boqun Feng wrote: > > On Wed, May 08, 2024 at 02:34:00PM +0000, Puranjay Mohan wrote: > >> Pull-849[1] added the support of '&', '|', and '^' to the herd7 tool's > >> atomics operations. > >> > >> Use these in linux-kernel.def to implement atomic_and()/or()/xor() with > >> all their ordering variants. > >> > >> atomic_add_negative() is already available so add its acquire, release, > >> and relaxed ordering variants. > >> > >> [1] https://github.com/herd/herdtools7/pull/849 > > > > A newer version of herd is required for this feature, right? > > Yes, this requires building herd7 from latest source. > > herdtools7 7.57 (released recently) happened before pull 849. > > Luc, what is your plan on a next release (7.57.1?) ? > > > So please > > also do a change in tools/memory-model/README "REQUIREMENTS" session > > when the new version released. > > Puranjay, it would be great if you add some litmus tests which use > additional atomic primitives under tools/memory-model/litmus-tests/ > as well. Thank you for checking, Akira! I need to hold off sending this upstream until there is a herdtools7 release that supports it. So not the merge window that is likely to open this weekend. ;-) Thanx, Paul > Thanks, Akira > > > Boqun > > > >> > >> Signed-off-by: Puranjay Mohan > >> --- > >> tools/memory-model/linux-kernel.def | 21 +++++++++++++++++++++ > >> 1 file changed, 21 insertions(+) >