Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2085675lqb; Mon, 27 May 2024 07:26:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxv8Mi/veWl0f+n+YBESASfqOrQ1GN1lidOUSCInSEn4DeoSgkp9kPFu6lOKWz5bg3qzTfQmccg996MkXtGvMj7+O/V+cToiR9CADRjA== X-Google-Smtp-Source: AGHT+IHSJOKZKEIrLTlCuEoHQw2D/VjNxZlU1C05NSNQI3xMdIIehsGjjBZiap11LsIa628Ny5JH X-Received: by 2002:a05:6a00:11de:b0:6f9:f67:d570 with SMTP id d2e1a72fcca58-6f90f67e466mr8782387b3a.24.1716820015316; Mon, 27 May 2024 07:26:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716820015; cv=pass; d=google.com; s=arc-20160816; b=YQ8z2OkRYJTYUDOlpCX1GD222WHh36ar6Oi6Rn3KKKAuQ429cLTsaNkDMnsGGENc6e uP5hj99W/uI4G/4x0bIscdc4vp8RF/G/d9EBjlVwaSV+NTClYyYgFRdTmz+BOS/xpBAY kNVtK4xfVEb2JsRg6iX8TYiDg70iVbImZXeL6HHmY4jI39KcZvtUkC9F+dU0BI35rl/g sxEfs1XRoKnt7Bo1O26YAHP44hW8FLJyg3YmMnI1iTjqefR26sYyUMRKxDlsZjAAGdF0 GvQs2zrV91jHUD+Kxtp9785Bwb28oVfBTWJSaikedPEb/NE1sTbhYvmWLxybR+fYbSvz sE5A== 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:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=Nl/skDMgDdOdiUr7JwfMynBBbUHRE16yc8bgrg6Slzc=; fh=ESCEKT9hwvvD+2LoC964EXN4Dcp9PWs0usbdXAjNaO4=; b=LTV61zMgL4a88LNjgKHks+x4iNxk7NmOU3Jb/8bqnVAfmbQ/T2NRWvJnWBQdW5KrmM 3njyy8ztwCh8YA0X1X1otA5Yv3aK3PGG2jsTQrlMq4MmCcQo+AiddGab4DiUXX+aqbxI lXgwo88ph45neygRIa9lThbpucxhkg7Vhx7k1nrZznfI5PTG6Q+xiEmKpkMYRDQk2xKz G8Aqq70rpehFEl+3PC3hbPkeVYhZaOv47oKEHkRGT38GsBHoNS3v4NfZuVuVm/qdF1x0 zE7dGuyKqE5Ybf1q6zXzV2U+xJaaunOS3fxI7tcjaN3m8Oopk+sWOQzTqCeSWHboLWLc u40Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-190741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190741-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f8fd8e5a2fsi6176939b3a.347.2024.05.27.07.26.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-190741-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190741-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CFBA9B2C380 for ; Mon, 27 May 2024 13:41:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 112A915EFDB; Mon, 27 May 2024 13:40:37 +0000 (UTC) Received: from frasgout11.his.huawei.com (frasgout11.his.huawei.com [14.137.139.23]) (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 BC9EB13A250; Mon, 27 May 2024 13:40:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=14.137.139.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817236; cv=none; b=tCp9YNGstpjjv3terWVbBkk+atAPoRs2HsbjZuU5vis0eNI6BC7HB3Bxy6nR53ivR/9y0cwfIbWwgNH32EwMXF4OZXdJEg4h0TN6K4hhEtclO2bgN8G47TKbe/jLP0UwvyzEIU4Vzjb1TBR77Z7ZiIqu9bx0+lXQKAzS0mANNOY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817236; c=relaxed/simple; bh=i+fmA1Usq+yf1h8sd1JSGhI2faM4avD4s7E3zhr+kbQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KC01pgjakEejUC9iLa8WhdfHM/je0AxbZGA4uSBHFE5KVxr/hchZ2X9+aFzxQIncIz5i9SOz75wa6jux8SiKm3UHc0Ce3gSddCcGH+7nJfCcLCNZr7G9fUIakSv4Y+mfadYVYXQr3N6uFSpVqAlx8s53gEviFMVThOhXD81xAuk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=14.137.139.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.18.186.51]) by frasgout11.his.huawei.com (SkyGuard) with ESMTP id 4VnxCy3RfMz9v7JS; Mon, 27 May 2024 21:23:10 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id CC536140113; Mon, 27 May 2024 21:40:29 +0800 (CST) Received: from [10.206.134.102] (unknown [10.206.134.102]) by APP2 (Coremail) with SMTP id GxC2BwD3MCVAjVRm63gBCQ--.51164S2; Mon, 27 May 2024 14:40:29 +0100 (CET) Message-ID: <41bc01fa-ce02-4005-a3c2-abfabe1c6927@huaweicloud.com> Date: Mon, 27 May 2024 15:40:13 +0200 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: Document herd7 (internal) representation To: Andrea Parri , Hernan Ponce de Leon Cc: stern@rowland.harvard.edu, 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, paulmck@kernel.org, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org References: <20240524151356.236071-1-parri.andrea@gmail.com> <1a3c892c-903e-8fd3-24a6-2454c2a55302@huaweicloud.com> From: Jonas Oberhauser In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID:GxC2BwD3MCVAjVRm63gBCQ--.51164S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtw4fZw43Xw18XF47uF4DArb_yoW3Xwb_GF ZakrykGryYkFsrKF48XFZ0v34rG393XrZ3t347KayI9F93CrW5Wrs7ZryfArnrGanIyF12 krZI9rsYvw4DAjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb3xFF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Gr0_ Cr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_Gr0_Gr 1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xII jxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr 1lF7xvr2IY64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxan2IY 04v7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v26r 1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CE b7AF67AKxVW8ZVWrXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0x vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Wr1j6rW3Jr1l IxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvf C2KfnxnUUI43ZEXa7VUbQVy7UUUUU== X-CM-SenderInfo: 5mrqt2oorev25kdx2v3u6k3tpzhluzxrxghudrp/ Am 5/27/2024 um 3:28 PM schrieb Andrea Parri: >>> + | smp_store_mb | W[once] ->po F[mb] | >> >> I expect this one to be hard-coded in herd7 source code, but I cannot find >> it. Can you give me a pointer? > > smp_store_mb() is currently mapped to { __store{once}(X,V); __fence{mb}; } in > the .def file, so it's semantically equivalent to "WRITE_ONCE(); smp_mb();". By the way, I experimented a little with these kind of mappings to see if we can just explicitly encode the mapping there. E.g., I had an idea to use { __fence{mb-successful-rmw}; __cmpxchg{once}...; __fence{mb-successful-rmw}; } for defining (almost) the current mapping of cmpxchg explicitly. But none of the changes I made were accepted by herd7. Do you know how the syntax works? jonas