Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2679509rwe; Sun, 28 Aug 2022 19:30:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PCnJEKCqWipyYUYQKTh66S/HgyOVf9I9tYjOdIxnnV/sEI48VVWgPnOXM5UL/hd1unRzx X-Received: by 2002:a17:907:3dab:b0:741:9a23:eb01 with SMTP id he43-20020a1709073dab00b007419a23eb01mr1265778ejc.26.1661740233169; Sun, 28 Aug 2022 19:30:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661740233; cv=none; d=google.com; s=arc-20160816; b=Afk1lic6ldeffYqZqZcXuPhXZpdhE7UX8e9UwdXePFVbvFTqVtAMgW2x3K17qHo/wN pVa54Vh4+2wC+HBSwvzZcrk2WYviuKCpabFBsd8uA+q4K8DvqaMXflqjGGFvfLEEThtC Ah7/iZFp6qgTb+V/YV/B68BX3CVMFFJVSFwBKPB0R7bAX5vsUlKoHez2PS6AlZnxmQQ1 u+/xTBIrel0x4tk7z/RyPv5Fbs6IDeGmm9rbxLNWZPiPCEckFaHJ4GmNNNqrWNyg6V5c i4Wb/FvpmuKr1F4Vj7tWU4Mor7AC//4VyTyDNoDxF7VkiFxpLWxrmpT47XUdRlZ1yESs xfVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EIPwhjUv8h30K8Ui8w76NDyV5Lb0v5YJ4+waiGfUYPw=; b=leLEpUxFQ5ZMsi3r9yyeGHTYFRpgG6u5h3eO4NO1IDMaJ0zWZOCHK8uoEKkgiSBnat 9u079asO8zdr9SEpqvoBIeJn1VgkPypwhXmGULcTKAmxyNPKHjwx/bYRwp5EFkK7quHc oueJM8VVOsksXCuDpUOaTW8CeYp6V42FXEgKxcYbNlYh0+nLF2umjrrdwObbL8oIbFJJ wxDTb3SGP3obpUTGvtXdtw5/qVwx9V1RfisFIZ98KnmSEEkRCsrWJdgZa1nBOlMFlKUg H1GvUD1z0h/h3PPDCwtQlTixtx1qyp1gz/9Sz2NaumgBO1uqOQp3r4fpk9CKu88nKcFX wL8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lrj39VVq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs6-20020a056402304600b0044864b984aesi1702967edb.410.2022.08.28.19.30.00; Sun, 28 Aug 2022 19:30:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lrj39VVq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbiH2CPv (ORCPT + 99 others); Sun, 28 Aug 2022 22:15:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiH2CPu (ORCPT ); Sun, 28 Aug 2022 22:15:50 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB4BD20BD6; Sun, 28 Aug 2022 19:15:48 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id lx1so12928415ejb.12; Sun, 28 Aug 2022 19:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=EIPwhjUv8h30K8Ui8w76NDyV5Lb0v5YJ4+waiGfUYPw=; b=lrj39VVqxYQ3QhQecMZQznjhs1P9Sxae833V9b8ccarwRRnN4GZ85/Uy++/hbRM/AI S5ZUWnd0+WHsYGn5zB7XfuWi85v5AGvjOTefUCTglvecUNH/O/esNPs7ZoW9nnZES++8 JnwDHtdYJYQ5gWwUpCdKFUQ2VKNHGA1fudyqErhkOBcjID6kTjCXKQN0pCCcZ3WCN77/ FynJZOC2DixFConIBgttZKC+XcX5GiMhb8OA4pHFgOWXoM3dFhxvfKkZfgFYkHegULOd twR6vc7cxWXeLz+CgHC4rsdgufvKpLzoUxCoy7t65KpBCr9+v9EqBd2vtQJ539+9Cse1 Jyeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=EIPwhjUv8h30K8Ui8w76NDyV5Lb0v5YJ4+waiGfUYPw=; b=hZX4Iyvh67PleJmOE3YQZ1XOIOeB1L9DcRv3r0T5f1EuxdDnysV2b4D89oJ5x5M/Uv tFiXMZ593M3qSerB9gdToyLKNqoc/3yca2ciWVtFRmzy2UsQKk2C0XTnDGHHGmAtaQ9T +wX9Mj1VQZ0MgivzBwxcvrxgHEn58EbCXt4hqc30LTgv2uDkgoNjGhHYnPa+pw7NynCi iZASfQ+OmYm5yJMlB5fxCs4ZlsxQ4Mk5YrlAreB/ACWJFQf3sBiH7EXca6h2ByDweFHy ThaR3Rn3TaTMSk8fcTrL354enKdF93r47lyJ6kWD9YTqYLq3Ceh4fmxyBA0KhXTyR8uB jFrA== X-Gm-Message-State: ACgBeo31+1YUKjgAdAhpzRvsXx0IT+FA8h7lUke8WFV/rgoTIdNuxh9I Y+FbbtKobqV/qXFvLDTrymk= X-Received: by 2002:a17:907:60c7:b0:731:17e4:7fcc with SMTP id hv7-20020a17090760c700b0073117e47fccmr12058833ejc.73.1661739347185; Sun, 28 Aug 2022 19:15:47 -0700 (PDT) Received: from anparri (host-95-238-28-128.retail.telecomitalia.it. [95.238.28.128]) by smtp.gmail.com with ESMTPSA id o4-20020aa7c504000000b004485afde654sm1867806edq.6.2022.08.28.19.15.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Aug 2022 19:15:46 -0700 (PDT) Date: Mon, 29 Aug 2022 04:15:42 +0200 From: Andrea Parri To: Boqun Feng Cc: Alan Stern , Peter Zijlstra , "Paul E. McKenney" , will@kernel.org, npiggin@gmail.com, dhowells@redhat.com, j.alglave@ucl.ac.uk, luc.maranget@inria.fr, akiyks@gmail.com, dlustig@nvidia.com, joel@joelfernandes.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: "Verifying and Optimizing Compact NUMA-Aware Locks on Weak Memory Models" Message-ID: References: <20220826124812.GA3007435@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > FWIW, C++ defines this as (in https://eel.is/c++draft/atomics#order-11): > > Implementations should make atomic stores visible to atomic > loads within a reasonable amount of time. > > in other words: > > if one thread does an atomic store, then all other threads must see that > store eventually. > > (from: https://rust-lang.zulipchat.com/#narrow/stream/136281-t-lang.2Fwg-unsafe-code-guidelines/topic/Rust.20forward.20progress.20guarantees/near/294702950) > > Should we add something somewhere in our model, maybe in the > explanation.txt? FYI, that's briefly mentioned in Section 11, "CACHE COHERENCE AND THE COHERENCE ORDER RELATION: co, coi, and coe": "sequential consistency per variable and cache coherence mean the same thing except that cache coherence includes an extra requirement that every store eventually becomes visible to every CPU" Andrea > Plus, I think we cannot express this in Herd because Herd uses > graph-based model (axiomatic model) instead of an operational model to > describe the model: axiomatic model cannot describe "something will > eventually happen". There was also some discussion in the zulip steam > of Rust unsafe-code-guidelines.