Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp570879rwe; Fri, 26 Aug 2022 10:02:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cTbW2deh7FuJxshdfL008ZIejS7SPKBGknO7qg8XGuW7f1nL6bsa1LQxn98ruHL23Ub70 X-Received: by 2002:a05:6a00:ad1:b0:530:2cb7:84e2 with SMTP id c17-20020a056a000ad100b005302cb784e2mr4662333pfl.18.1661533370135; Fri, 26 Aug 2022 10:02:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661533370; cv=none; d=google.com; s=arc-20160816; b=kk1P0vv6xHFsxgX2noPGgOASOLDuyKE9p+Ngejhehy9FDnHg5/H2Ngy9oLWnaT6NnC 7CDmoahOouECM7I6kx6bRnGlCfAtzJpL0cCYsBVKuezVdXkKP1vSh6c31oErg6uquIh9 x8p0hvWaDJMo8+ROYkeyChIzS9gR08+4TBoa46ZeFH5vvYCIrIZf/mKHvl68ndg7GWMv Cd3TLdHib88Xw7YsnLA/35a4gn1w0ljs2v8ZJ4YplxfOmnjozDXFpyf4ByGTwxpk4eqO 26nPMcvVlA6gYx5w6q999bwlc0wRYihdTwgqnmls0XdPsUDttN3kbiGuWeeexVz31iO1 SsFA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RSEtVb8ScTY+XbkAjUrnggVuIxKCMda8Fd55AmgV0fE=; b=YAgtoitmpz3EitF62offTTqy4fmcX7LoD/Q+PWAxEmXkTcUBrL0E2iF7rGFbfafzpS 2aChoABtTdj5hpQyQWUicvc0AkgNkzutA1qoTTcibQg8l33OnoMsx+CnFbPsprhB7irv YF6YeztkRVZnSEHZvhlX00GRKL1Ku87yAIkptqVzuZ1kB7G2XbvQb4MZizim74+AAbSd ebE3b4FkIhXEPvlp4GYMA5eS8Fc8KjY4ERxDq2LPg7kzGYKG4bwPCr+OCPZculvYtznJ x1iyLUpJdJFrocQBEbPFyP8LvMjbgrXFdn6qftwd+EN4Gvp+RXxH2YiQ4H/y3GCr+8rf Qx1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=fa9QMCKd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n25-20020a056a00213900b0052d979ab657si2023684pfj.125.2022.08.26.10.02.31; Fri, 26 Aug 2022 10:02:50 -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=@infradead.org header.s=casper.20170209 header.b=fa9QMCKd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233017AbiHZQXp (ORCPT + 99 others); Fri, 26 Aug 2022 12:23:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiHZQXl (ORCPT ); Fri, 26 Aug 2022 12:23:41 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78ADBDDB46; Fri, 26 Aug 2022 09:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=RSEtVb8ScTY+XbkAjUrnggVuIxKCMda8Fd55AmgV0fE=; b=fa9QMCKdpqHUPNujkPgLB1i7at WfD+1EdVsjpFAP/NhxZcY7W6p2HcLnCYfdUB1EyznM7rJlCvfM8YyjWaE68VTDEi/Yp3SbR5TH0CY k7878izQCPeUPCgKyW9Bbmq0evzWZKIsEuXIjUOpGyrW1zKLFrFIMvyikRw2lwpqg6TVRDhabmzzM VAi44bDQlAUuiXu610xEBloWYCSzYnTwS+lElAgsgz24eAhB4adTGQ4gDkm7bas7WTsaGigvMX6WW dd/mh/HGknOMVN97PJrG8nu+uUGxzpXOwhZxNs4DrDt5faaZhr3JNFwAJoRH4id8l1ylBL3o3PY3Q dvqkVPBw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oRc7C-000gTQ-Fl; Fri, 26 Aug 2022 16:23:26 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 262579802D7; Fri, 26 Aug 2022 18:23:24 +0200 (CEST) Date: Fri, 26 Aug 2022 18:23:24 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: stern@rowland.harvard.edu, parri.andrea@gmail.com, will@kernel.org, boqun.feng@gmail.com, 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220826124812.GA3007435@paulmck-ThinkPad-P17-Gen-1> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 On Fri, Aug 26, 2022 at 05:48:12AM -0700, Paul E. McKenney wrote: > Hello! > > I have not yet done more than glance at this one, but figured I should > send it along sooner rather than later. > > "Verifying and Optimizing Compact NUMA-Aware Locks on Weak > Memory Models", Antonio Paolillo, Hern?n Ponce-de-Le?n, Thomas > Haas, Diogo Behrens, Rafael Chehab, Ming Fu, and Roland Meyer. > https://arxiv.org/abs/2111.15240 > > The claim is that the queued spinlocks implementation with CNA violates > LKMM but actually works on all architectures having a formal hardware > memory model. > > Thoughts? So the paper mentions the following defects: - LKMM doesn't carry a release-acquire chain across a relaxed op - some babbling about a missing propagation -- ISTR Linux if stuffed full of them, specifically we require stores to auto propagate without help from barriers - some handoff that is CNA specific and I've not looked too hard at presently. I think we should address that first one in LKMM, it seems very weird to me a RmW would break the chain like that. Is there actual hardware that doesn't behave?