Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp780428lqo; Wed, 8 May 2024 15:00:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXbIboq4BpW8V5A3PQYvCYHokym5Cpl6s4bpeFDAHAxjTX3+gp1XProqB9nWmrELwUV8uNIqZj7WpFfA1whKelvI79SBzVEooVoGo9dyQ== X-Google-Smtp-Source: AGHT+IFIIERTX1J7hFbRCneWwVm0owrdwtTI14kJYYdypOfJgMcY8+xLeEqok+qcCqBB8/YTX7Wp X-Received: by 2002:a17:902:d2c8:b0:1eb:7981:28e8 with SMTP id d9443c01a7336-1eeb03a69e6mr52927895ad.7.1715205641497; Wed, 08 May 2024 15:00:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715205641; cv=pass; d=google.com; s=arc-20160816; b=Xw+QSLvrVKMNpHQWcti3lhFzFl7NaoAarTGbhRwZ/lP8x91xS0Jd/n7QM05R8Wd7Wo vq1132/5TDSrtTukf2nqiTQ61dFRxDm7+WbuLgz+Ux4bh48xvRhh1DSksBwLMH+rrLOF 2PdT4k3X6dtspjB/4hoNlwj5/wuGP0dl0hVWkRUrke/+lTFvBeZcU7uaO81FM5HZNRu5 ftJaUuL8iY/MbLbLrRtJBpqvmQxa8LUcnHdQPytblhQxnk2I81scH691MPCMSw9MFMU0 zOw59XUyyZd2iONy0EYJRtcyBnR/NWri9ojP8jqYla1/mJCHBAXVd3G1C/glmCpRj13M dnag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=AMw/YrYkp2g/WGx6rK85U9z1vCqgtkkofZwvEj3MD6Q=; fh=IwHn2cQMbaGe2T0DYOW3aOdqV2Sz8Rx9bCCmjMLIzMY=; b=fHNrlpIuItspMAIh/3QqypBWdavDdUOiYAB0GOmsUf96ls1X+RyiiYfFflT3YG0nZO 0s1t6gcEbeUSok2MCs7X10yoznADvpNQNlKGu0D14J9gJjzj/pg8v/5U+EF4EdfwwQa9 +Lyp4txpSG8zbNEt/ebac90AWVB6blkQlMjh4dVWU57FAqQsLCje74xrTXEgb9OTL6md GW+jQG9KEtxBIwVQQFwbf9ZUeSC6Sl9FLHaDfWWp/qLvV/HKWtyeUvbhjxObIZ3TLBGO hiX/u1lKUxoVb/ujPucXKVr62qJurW9EalzcPOhVXW3eKxKPxpjdR8aGdajElg/1qgMD O5CA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bsA3Ez9Q; 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-173870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173870-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c039009si522545ad.378.2024.05.08.15.00.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 15:00:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bsA3Ez9Q; 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-173870-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173870-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D520282F6E for ; Wed, 8 May 2024 22:00:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 144D6134CF7; Wed, 8 May 2024 21:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bsA3Ez9Q" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.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 A4B96134CD2; Wed, 8 May 2024 21:59:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715205565; cv=none; b=p6u88cAJwAsWxOUq9pEpjeG1hHL0F10HZx2XcDFzQGvUBfqbzTP9JjesVGj9g+hLaCSvl3Hj97EtvfAgeMo05goBJ0XA/cIeL/YCQyirhh3NEAwPz0sf6/dUqotBdjhN5j5F+j8zHrEG7aK+0PCrMVeVXtvmRpWakeYg2Bb+hHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715205565; c=relaxed/simple; bh=nByr3jM+Y3NxC0MP1AcoNq5+7invfqX5YpdGYrcZgC4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=HmuUBcW46sZ+NcDhzGciLazvDySHsDzYzNIuxPoXmHRy5pIPo61m0dtLyV48leWIJl+xCU9z74Xp2n9usH62pZljEXKNLJXmjXtuNhYVgCzQZJzrSog4xRJWKM52Nkb6xy9onvKp4MLsuSsfti90LixMZ3axaIcBwWOwsB4E7o4= 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=bsA3Ez9Q; arc=none smtp.client-ip=209.85.210.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-pf1-f176.google.com with SMTP id d2e1a72fcca58-6f44881ad9eso248779b3a.3; Wed, 08 May 2024 14:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715205563; x=1715810363; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AMw/YrYkp2g/WGx6rK85U9z1vCqgtkkofZwvEj3MD6Q=; b=bsA3Ez9Q9UyQuPb/zRzp4IwvSX8JEdL4a1QxoAJx9UcYdqj9lpU2WjV5wefxCzknX5 o92PNjBY3Wpy5kDRsMrQxNfUuUrrWjQau/0DN4wMZAlIwaUdso+Q2E83qJDNKsqGZ0fH 2BUSBUeoWGvuGQJxyGavW40Kq5bkIB+Jj25h3hHFbJK/fcZ5nla6EQqS478MMFweyWZp iJeuSkCmlt+gGMrnkCdDE1jphm8450jW9diQvWPK9CgoyXxJ+4FLOMJak2dAcsB0rKIC LAVUxYV8RcKh/4UxCnjcUBDeEcYMRzV26xMqGuQxJk4AukA5TLZnVqIqUvuYQd6DQbne ZD6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715205563; x=1715810363; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AMw/YrYkp2g/WGx6rK85U9z1vCqgtkkofZwvEj3MD6Q=; b=kJTYuBiUuGBObIajJNQkN6/Sb6/b2il5opTBL0HlKUE46hKQ3Yz23ccoW7EjQxQgvc uMrCikpZOw0ufeghSa+BDud8pKqhNP1iSbnLmQzmd4whRUGCIpCYwEAQqsiB+4sbXNE+ IgH84lpQlSupkQT0bsBWYE7DRYdwmYPzBO8PzbDI0wKxEEBsmhsXdt5jXUKv9rm4eNeT yNVNNCAQyHVcgIZGTLEqq8gsqHxiy59T9ce8eqOHz+mD7DVQOOpMVYMZpxeHn4dgB1Ki C2a6laFmjghRqeXQRFQeUc12p2CUS/llPwxVImg8yQ3sHowt0KfHkB8kZDOjQzHDOk3y 0RGg== X-Forwarded-Encrypted: i=1; AJvYcCXKfpFbZGg4GXMwv5C/T/Dc3wTIqj7kyq1t5dHD7UPmiPxMjdu3QUbJK5/9Oy0GdUmBk3SBG/QEfZpo0VeTSRY+CHWsCzEEU96KhBF7VRbJ6XweW7KkB2+hFkxnEcKLdvdpcOgKGHPvfw== X-Gm-Message-State: AOJu0YxLRIETObrXfHPG58V4iZ1zeBorvJwZk5kdj6CJW3wXemqnK4z+ ruYgKEjLqD8DprA0WJh58EJgmnNUbUtQO/D2GpjuNzD2MSL9qVym X-Received: by 2002:a05:6a00:2f0d:b0:6f3:ebb3:6bc6 with SMTP id d2e1a72fcca58-6f49c20e6afmr4041629b3a.10.1715205562906; Wed, 08 May 2024 14:59:22 -0700 (PDT) Received: from [10.0.2.15] (KD106167171201.ppp-bb.dion.ne.jp. [106.167.171.201]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a66585sm62052b3a.10.2024.05.08.14.59.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 May 2024 14:59:22 -0700 (PDT) Message-ID: <7e7167fd-cf4d-4d8b-bd83-d9fe8887dbae@gmail.com> Date: Thu, 9 May 2024 06:59:17 +0900 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] tools/memory-model: Add atomic_and()/or()/xor() and add_negative To: Boqun Feng , Puranjay Mohan , Luc Maranget Cc: Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , "Paul E. McKenney" , Daniel Lustig , Joel Fernandes , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, puranjay12@gmail.com, Akira Yokosawa References: <20240508143400.36256-1-puranjay@kernel.org> Content-Language: en-US From: Akira Yokosawa In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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. Thanks, Akira > Boqun > >> >> Signed-off-by: Puranjay Mohan >> --- >> tools/memory-model/linux-kernel.def | 21 +++++++++++++++++++++ >> 1 file changed, 21 insertions(+)