Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2199419lqb; Mon, 27 May 2024 10:58:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFSuVJGLDGLDGFAqOQ4GfsuHGBxgg3/wGofRYfMXjbIq54uyHwS3eSf22BK/U/LM/+Ixm/C7kjZiYki6eyEVC2zJSrcfjahMxkt4XJ6Q== X-Google-Smtp-Source: AGHT+IE1l3uVXsJAe9/vU+Y36BRLny2aqz+PV0T/s2/w4seXk6pvv7nLwlaGkLqOYCa4dQ2aKE4F X-Received: by 2002:a50:9e4a:0:b0:572:d536:5d9a with SMTP id 4fb4d7f45d1cf-5785197f20amr8585035a12.23.1716832702256; Mon, 27 May 2024 10:58:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716832702; cv=pass; d=google.com; s=arc-20160816; b=h8erhq3J6+EYC85WSrNp21r23KCDCxgxGKtYxVV2lUDl2RNU9IIYyP6XUowkqQPb0P 8mlMr7EA1dQiFfV4jALrGmvpr4I5EAYxQ/q7zMHOpttQrqW8V+aMlYD0pfT/cFW7dq7D zaaCt/1bLm+eJWMcaeeZQaHtPVvXVCIXCQieUn+KRdyouWa4JUwCJEiqGzwB2xEs2ZD3 u2asrMX9yCtqQaW0gTTiPF7BEJHVamDKPsOGnav1B+JCACo1leYl+bIAWWPo3z9TgcSy Jsc8cDSHDok3wk0lRdVyOXP5+63hZNa3GsNyenqCssah69mb76Vad7YGZmJAPqwFKrli KVYg== 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 :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=STw5C0TMshU0Til7uvC9SBKMcZLOe5th0VhBfWeHh2g=; fh=E1wjq/us7vBaKhIpOZivPdYsHEfI7iJb4py+Y4Ph/p8=; b=XawndxcJNl+4L5+APiQvoyry4NPcGC7yd7KiNZV3yP7qRkDYK0/K3bBTqihUGREJzq SeLhdHUQFu57HxDn95Diq8ZxjwRPzrXLAh5k3nPkr+SIbLyrz/xlBn+06hf1VdrwM7JN H4SXIsrxcjPCGp+MQdnlxawGRSwwkL0wd6Mu7Ht0NU0cYVeZzDvJIhJ5GJxjs3iipFl+ ibwOiKUyuQEFXn8XKEnqkIJhU0bY4XJtlojdJHZmiAtHL0hIDHd5Q7WCjF7vRM/4y4N9 eSiZm+QykuceFoIxkxVWfzXU7L8LK1FiAPdOQwXYFTR6itODvYjca9xiysDpEjuY1iF4 fO7g==; 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-191308-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191308-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785d34dbbasi3784512a12.582.2024.05.27.10.58.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:58:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191308-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; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-191308-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191308-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 am.mirrors.kernel.org (Postfix) with ESMTPS id F3EC41F2234E for ; Mon, 27 May 2024 17:58:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8784015F3EA; Mon, 27 May 2024 17:58:13 +0000 (UTC) Received: from frasgout13.his.huawei.com (frasgout13.his.huawei.com [14.137.139.46]) (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 6CB6515F321; Mon, 27 May 2024 17:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=14.137.139.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716832693; cv=none; b=OKWn0SI3a5GH/nLIQzyedOYnagvr/FJSX5TQTm/tlEaGiLVgBEJ/S/FibRh5R6SHB7N2Drq+9GLGkTcnNkNCbh84CJns4uCh7zBcSHZzAkW92CjQatMcZZzmjNupn1g+wZj1OQdHcKstQbptK+Z8pGrKpOOyrmjkfpNak+rIIbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716832693; c=relaxed/simple; bh=jDAFrzgHrHC254nXAC5kmkv2OBSuJlA9e/44Od3NNqo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=n2xBRP+GQ5VvDAeDo6T6u3afPOD912nx1x0JojUa2F2GbUajrSCY9atazhcXckwu+om7vU9v8SqvCgk5dOtwPstK+RmWr01PE1PT9J1X0wL957PWCmUETa0lNGpBxEB/y58LdrWdmb9EhXkZLN1vLwvzlPyuUHdESMTS3iAIicw= 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.46 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 frasgout13.his.huawei.com (SkyGuard) with ESMTP id 4Vp2xD5kw9z9v7Hm; Tue, 28 May 2024 01:40:48 +0800 (CST) Received: from mail02.huawei.com (unknown [7.182.16.27]) by mail.maildlp.com (Postfix) with ESMTP id 8F059140485; Tue, 28 May 2024 01:57:56 +0800 (CST) Received: from [10.81.209.100] (unknown [10.81.209.100]) by APP2 (Coremail) with SMTP id GxC2BwDXDySXyVRm8m8ECQ--.35226S2; Mon, 27 May 2024 18:57:56 +0100 (CET) Message-ID: <5a9bc579-01ad-0b0f-bcba-c8f0bd932331@huaweicloud.com> Date: Mon, 27 May 2024 19:57:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] tools/memory-model: Document herd7 (internal) representation Content-Language: en-US To: Andrea Parri 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, jonas.oberhauser@huaweicloud.com References: <20240524151356.236071-1-parri.andrea@gmail.com> <1a3c892c-903e-8fd3-24a6-2454c2a55302@huaweicloud.com> From: Hernan Ponce de Leon In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CM-TRANSID:GxC2BwDXDySXyVRm8m8ECQ--.35226S2 X-Coremail-Antispam: 1UD129KBjvJXoW7trWUZFykuF48uryfAF4ktFb_yoW8Jw4kpa 47GFZ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024 3:28 PM, Andrea Parri wrote: >>> + | 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();". Ok, so some fences where added in the .def file (this) while other programmatically (e.g., xchg). We should at least be consistent about how this is done. Based on previous comments, it seems most of us agree this should go the the .def file. > > >> What about spin_unlock? > > spin_unlock() is listed among the non-RMW ops/macros in the current table: it > is represented by a single UL or "Unlock" event (a special type of Store event > with (some special) Release semantics). I was blind. Sorry for the noise. > > >> I found the extra spaces in the failure case very hard to read. Any >> particular reason why you went with this format? > > The extra spaces were simply to convey something like "belong to the previous > row/entry", but I'm open to remove them or other suggestions if preferred. I find it easier to read without the extra spaces. The empty column on the left already tells me this is a continuation of the previous row. But I don't see this as a blocker. > > Andrea