Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp660152pxb; Sun, 10 Oct 2021 07:59:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjo+mz5axJN2au9/ViiBDFsfDda9z74aNY+00oH9rkv2ptUKeRI9mJ3il/Ik+wrio2o+6J X-Received: by 2002:a17:906:f15:: with SMTP id z21mr18863808eji.177.1633877971488; Sun, 10 Oct 2021 07:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633877971; cv=none; d=google.com; s=arc-20160816; b=o+yMlJyudpyIx1xIBsXb5iLHMNJPMYoZTTLSW50E8EBi+F9B6I+lT/E1gFf7mIS6GI piR3Qwri/fE2MOc+usVuRGGbe+Zv0leM3d3f7j1xPuOieUwhrW9KVpt308MuQ7L14XrZ tLllKOuaR3foy8MmwYo1SjZp9NU48W4qaRhXVOZlQbS4T9Z+T7q4RnAjaiba6o1GKJh/ m7ByoyVCcidk2JkMxxHGfG3S7yhQU2cl9wEb/od9XKBBnsTCPZEpIl2I2yC3ilxFOyqU FJgsWTAw5gJlo772Qcnar5i2bOhzl5ItkX2YmVNG4OmSUd3d76XcDrkTDKFLivr+1Qdz prDg== 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=YzsW4oaRYWh/PSqb1gGOzEnZWrkrc4WMPo9eaQRhBrU=; b=Txncy/Qn1tXXxT1tm8XK/IBZ4aD5ZHtr6OjJhQCCYjZxZ5KavkhKWsfSEnvdhctTSn /IVvoFBzcesee1tH8ZCekNB98H0LX6TYNjV2VVZmHYzU7zt8ewcZH27LT72cBFJBYXdH PJQo439Fy3hk9qODOr6++53WOWMkVYg7xQhqsguFQDj9L7ulPyQ7QCwngTJjeqKy5E74 hcTLAv1WR/hiFgKPsSCSlOQxFf4cAwgzHZHqBd24MqoRQdj0gwV9QXAwH7y+7PWz2kA8 doSWjbJO2N0gil45URyLRYO5mJ9YCk8D5R1WbjMsN/b0TlESvSi9+CZO/8xpqgtSGNRg dOQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZWwjrQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dd23si728969edb.42.2021.10.10.07.59.08; Sun, 10 Oct 2021 07:59:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZWwjrQS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232395AbhJJOgZ (ORCPT + 99 others); Sun, 10 Oct 2021 10:36:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231842AbhJJOgY (ORCPT ); Sun, 10 Oct 2021 10:36:24 -0400 Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E90CC061570; Sun, 10 Oct 2021 07:34:26 -0700 (PDT) Received: by mail-io1-xd2d.google.com with SMTP id b10so1783049iof.12; Sun, 10 Oct 2021 07:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YzsW4oaRYWh/PSqb1gGOzEnZWrkrc4WMPo9eaQRhBrU=; b=fZWwjrQSPxBuf44Hgb6oDHvJ2UoqWrh7YB45ip6bKVAt2EixdLHmkFbDhKOZXHfbNk ZEdI1vTmSJAnPuBdtEnzWZ0B9je99aSjVm2DHFzcG2oTcOMIDqbBhtA0LKRjJxIwb87N nCceE/g7tXdbiIcMup1wk8EfteveV9TgANYzBncmOPqh6RBZY+dmVH4206x4Yru68T5j UwmrrMkioeeqDLPgsPY9SrQknlIwA5E1o4fo9k8AoNrCjDNVUqm4w/5MU7CPQ0t89YNJ l9iEisMhKtR3m9mgmkSE88R+LFoFd975xqcjCffEaE6FlY5d8Jj6r513B7zJ0QHwBgPo Xlfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YzsW4oaRYWh/PSqb1gGOzEnZWrkrc4WMPo9eaQRhBrU=; b=J2e1BZNP7s6D5940JnpRH3tHD/0w4gu7gPxV/oyH/Bi+yaB95hl1lHMSIXPIVeavvX OmsaY1osMWGA2KUv2lpx6NEQzPDrWDpYBWQ+QMsB187PUr6VPMlCXaSlE2idleDP5bw5 d/DfSfs48118aIkDStJbom5mK81xJPSNSP1DlLnWHDHuBUMW05IaFRmKVv5NV+Gg04mY ufLxcvDfuOJUzM8XiyjwEEZjHCrNN5O8OC7S+qwujeaeUE6TU1Z+cSEIvSl9ErPkuxqV DYlE+GY9e+uQ79yVuG6MxdLCYz4X3VPaTZy+wCgKA/tmZuHDKmjzV1R+nY4+PQT2TvZv u4ZQ== X-Gm-Message-State: AOAM5314jnAuqS72mjHOmsrkeW9tMdE5z2zvukA3yRFTUjvVY0wYz4gc FVTQOt7BRlvWd1lh7QpLfCw= X-Received: by 2002:a02:cb1e:: with SMTP id j30mr15179400jap.143.1633876465976; Sun, 10 Oct 2021 07:34:25 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id q17sm2704829iot.16.2021.10.10.07.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Oct 2021 07:34:24 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id F413B27C0054; Sun, 10 Oct 2021 10:34:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 10 Oct 2021 10:34:23 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtgedgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhn ucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrth htvghrnhepveeijedthfeijeefudehhedvveegudegteehgffgtddvuedtveegtedvvdef gedtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhp vghrshhonhgrlhhithihqdeiledvgeehtdeigedqudejjeekheehhedvqdgsohhquhhnrd hfvghngheppehgmhgrihhlrdgtohhmsehfihigmhgvrdhnrghmvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 10 Oct 2021 10:34:19 -0400 (EDT) Date: Sun, 10 Oct 2021 22:33:05 +0800 From: Boqun Feng To: Palmer Dabbelt Cc: mpe@ellerman.id.au, linux-kernel@vger.kernel.org, paulmck@kernel.org, Daniel Lustig , will@kernel.org, peterz@infradead.org, Linus Torvalds , alexander.shishkin@linux.intel.com, hpa@zytor.com, parri.andrea@gmail.com, mingo@kernel.org, vincent.weaver@maine.edu, tglx@linutronix.de, jolsa@redhat.com, acme@redhat.com, eranian@google.com, Paul Walmsley , stern@rowland.harvard.edu, linux-arch@vger.kernel.org Subject: Re: [PATCH] tools/memory-model: Provide extra ordering for unlock+lock pair on the same CPU Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 08, 2021 at 09:32:58AM -0700, Palmer Dabbelt wrote: > On Thu, 07 Oct 2021 23:54:23 PDT (-0700), boqun.feng@gmail.com wrote: > > On Fri, Oct 08, 2021 at 04:30:37PM +1100, Michael Ellerman wrote: > > > Boqun Feng writes: > > > > (Add linux-arch in Cc list) > > > > > > > > Architecture maintainers, this patch is about strengthening our memory > > > > model a little bit, your inputs (confirmation, ack/nack, etc.) are > > > > appreciated. > > > > > > Hi Boqun, > > > > > > I don't feel like I'm really qualified to give an ack here, you and the > > > other memory model folk know this stuff much better than me. > > > > > > But I have reviewed it and it matches my understanding of how our > > > barriers work, so it looks OK to me. > > > > > > Reviewed-by: Michael Ellerman (powerpc) > > I'm basically in the same spot. I think I said something to that effect > somewhere in the thread, but I'm not sure if it got picked up so > > Acked-by: Palmer Dabbelt (RISC-V) > Thanks! > (I don't feel comfortable reviewing it so I'm acking it, not sure if I'm > just backwards about what all this means though ;)). > > IIUC this change will mean the RISC-V port is broken, but I'm happy to fix No, the RISC-V port is not broken, this patch only strengthen the unlock(A)+lock(B) to TSO ordering, as per the previous discussion: https://lore.kernel.org/lkml/5412ab37-2979-5717-4951-6a61366df0f2@nvidia.com/ RISC-V's current lock implementation is fine, and it's still OK if RISC-V still to queued spinlock, since as Dan said in that email thread, the following code still provides TSO ordering: FENCE RW, W store A ll/sc B FENCE R, RW Regards, Boqun > it. Were you guys trying to target this for 5.16?