Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2062885lqb; Mon, 27 May 2024 06:51:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUARo08O5CjJ1RJ75U2rXyzGHPVV3LQNbgO2aJ639XcQC91+ATLG30YDQqvzYMG2MWvlNrWFnnyg1XzFUrf87QjXEjLKgy0/rUlYfNfIw== X-Google-Smtp-Source: AGHT+IF7LzobdTOLJ66eNyYqyvsEH3dzwcAme8scE7CXm3VaBW2i9VTi5ApENcltaLbLTVzVtDWB X-Received: by 2002:a05:6512:3682:b0:51d:aa3a:4aac with SMTP id 2adb3069b0e04-529642048c7mr4783502e87.1.1716817885300; Mon, 27 May 2024 06:51:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716817885; cv=pass; d=google.com; s=arc-20160816; b=eF2eIcAK4y9oHcB1hZKWKvHn0a8k8gdELg7VPjvZJH2mZv9D2IqlvX/BTdg77+phoD 73eRfs5hYISWKEImaYQY1amRHcn1fWOPDNjMPEeb0TN3XbjzvhhKQDr/iabmeNNvqG4i lXtBl0xb9IkZp3DFjF/SBjRud1CSThExrov1XdaNo0gUnwtLw59a0l0ZTiK/24jytKmK qfz5NJK6LoMCa5iSO3Sqd/zEZKN9+ld1rfSC4N3BHpO9u4RXNuOadbCofCKvAJgb1f7r gDt3HxEl5zvaA7h1g5OKDZinWfIZbZV68/NGksdXv81WOZT0tno2zLxguG0PW9xu5W9t jMuA== 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=nKwsilOLvIVvBc4piQKs7LOFLkPcWIhWRcrIoCSwbx0=; fh=iVDakR4lJruOYNIzC8v2FsiCGW8/3YTTtWcdwjFIYC8=; b=FQV29HFctvCFwk6O5AweNbub1jPxkECaRm660NlUvgKay3wNRcpRGTmYvyzV8au8AA URx4wOOcXkmwhkoTmWolwFB9uDqRnLiUrxaAzZzBITY9NkLpoJdUk7yM3W0fAexn4g6L SA02u0ji+0wXl8UmST/hsukuQaAawOi/T16jG3KjyGXd2w6Vea84L4LTPmOiZYctC/Z8 t2ePlRZO3qnejHwlNv97HHhNQLbYZnk+de8NTV9OBzDUW4g+yHgfGJDwv6gG1ZroxsEL uvUpUKW1RTY/Fw5usFjk1FdRd1S/XokAxk+QQg0Ca7UWxBvKNVVTDM7IMBogiU3mjKhx xHhw==; 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-190736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190736-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cdcf059si385750566b.919.2024.05.27.06.51.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 06:51:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190736-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=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-190736-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190736-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 563501F27B9B for ; Mon, 27 May 2024 13:40:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 728E015F306; Mon, 27 May 2024 13:37:43 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 57ECB13C676 for ; Mon, 27 May 2024 13:37:41 +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=1716817063; cv=none; b=tMLHUfoKOI552X8e34FCN0O+LFJHo9LUpopzdeCA4FLL9YBLMZidyzKqG0nQPi2OuQDd5HpT18WdPWQ7RjXZO1UdjaX5Z8bGKDQlrMa8By31u/NvLR9Bfk6hRNRl0uZCRCAfan96cTSSHhMi2uBIZKSJJ0hWkws9W/l9kdL6tbA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716817063; c=relaxed/simple; bh=hu3RbPEZYu07ul0XYi5mcIaOW0Fav7jWM8/YiVU2vBE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MpbxGVpdBHBOC+1lCwskUT6d/las7Qdt4vI15Smojm4DLvP5cY3Ru7vRUL89/xqAyhewBb0PcUYrEXm7o9sO3LVLjKfyLeom5czmlEcSNL6bI6SBCWb4vx+qxTmeGb2yWX0HQPlWxIRpopS07Py2prq91l8nnG6kCBs923/zUcg= 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 660015 invoked by uid 1000); 27 May 2024 09:37:40 -0400 Date: Mon, 27 May 2024 09:37:40 -0400 From: Alan Stern To: Andrea Parri Cc: Hernan Ponce de Leon , 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 Subject: Re: [PATCH] tools/memory-model: Document herd7 (internal) representation Message-ID: <79b55c10-dd06-4947-8545-20ffeb324bc6@rowland.harvard.edu> References: <20240524151356.236071-1-parri.andrea@gmail.com> <1a3c892c-903e-8fd3-24a6-2454c2a55302@huaweicloud.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: On Mon, May 27, 2024 at 03:28:00PM +0200, 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();". Why don't we use this approach for all the value-returning full-barrier RMW operations? That would immediately solve the issue of the special-purpose code in herd7, leaving only the matter of how to annotate failed RMW operations. Alan