Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1066511pxb; Thu, 28 Jan 2021 07:18:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmJn7crG9Z6zYff0nUEuTE7aIompQE8ZInjcOkiK9fYmHT3/D0Y4WeVI4fo/f4125QqII0 X-Received: by 2002:aa7:d78e:: with SMTP id s14mr14637109edq.329.1611847080990; Thu, 28 Jan 2021 07:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611847080; cv=none; d=google.com; s=arc-20160816; b=QP17kkE1ZndJZyCOuiE6qaVQrs9I4OhWmX80KFy88hYbt6vqO5FXTtqsZQO1U3Jswd phAfwjnEj0qsPrTYxEyb05vpaYhuvy/sUm+scIwdynY7GufJDWrbUVAqITaFAEj5N5zH j08TTG9USOoNSdKI33VD7F2OawEf9c9ZbUzDuIzV9OUthHjUur/Wo5cMpS8iRMe9D3Fj R/FZ+6oosZWID9s3T8Caau4vA/OzuilJ0efX/Dt66/GCJhmS+lwwrov4ICeWj0DYBzaA 8tR5JQ3vTmukEK8o4E9wWeqMOlGoKYC+tK+KeTdTCRZuU9P8170Fv11gumJqZTozwwbs fLrw== 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=vdz2uLFVvEe0lGBz/swsb4ZdsSS7Ujlldtrdac+osrU=; b=uC6oe1BWxBEG6wcJFXOx9DbVDRMomilbjV+Gtq53QqA4yWE14RokYYuUiehvQyVYIE oNxAkGMRP3s5hmtR52EgCBeR2aC2P5ZbquMx+kgQWVk2gPLgCx5NhMN/sIACSJ/tMJec z1f1/tbqaYh5rudrbLUsE5WpfmmgYESnJjGC19sC+sJa7rku7O9eFNs6tYjlK1k+fbUK uCotDOmrTkE+7gZqoeBUXWEnCYOLhjkM8KPwtIUJH3otdWPrTIf1WcCvJk+2fr4k+EB9 D96w+15qerupeF5Tp7XOyvahbinuXeQ+gr+ofUDnamWNiJ7OULRthhJrYNJSIA9dxfGO RlCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=vhmgOk52; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 33si3242168edq.206.2021.01.28.07.17.36; Thu, 28 Jan 2021 07:18:00 -0800 (PST) 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=@infradead.org header.s=casper.20170209 header.b=vhmgOk52; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231634AbhA1PQm (ORCPT + 99 others); Thu, 28 Jan 2021 10:16:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231481AbhA1PQf (ORCPT ); Thu, 28 Jan 2021 10:16:35 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7069C061574; Thu, 28 Jan 2021 07:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vdz2uLFVvEe0lGBz/swsb4ZdsSS7Ujlldtrdac+osrU=; b=vhmgOk52SZEcAoLuUE2jqc0MTE N4NkQnJTOrTaKvj5EHF1CvZEyjCr4/K+fk2RfrhHIG6Kev/aPydD5W+TOy+kFArvkHemdoOjkVwI8 5OsogBc0GuEssMzNTeEmiiNSqsqb8kmM59BWzLNH0fpXa3O/sphAUxBuy0II/P8+4ONr5mwacGUm4 L1WBS8fnnZroc1JVkbZ1q2wCXm+zAXsjVPOUP41eIULVeydEl9kvqQ6HLRXMOHh7y4eZpJguiTiLL kfK+4T5chWxdaI/L86zxNDibjUa2TniEmzcXEO4e/qxUbx4BjnPlS+DjFB91Az5bJD3y0PJsVsdaw cyBPqakQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1l591D-008cCz-Kw; Thu, 28 Jan 2021 15:15:36 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 48ED2301A27; Thu, 28 Jan 2021 16:15:35 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3242C21405347; Thu, 28 Jan 2021 16:15:35 +0100 (CET) Date: Thu, 28 Jan 2021 16:15:35 +0100 From: Peter Zijlstra To: Alexander Sverdlin Cc: Paul Burton , linux-mips@vger.kernel.org, Thomas Bogendoerfer , Will Deacon , Boqun Feng , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] MIPS: Octeon: Implement __smp_store_release() Message-ID: References: <20210127203627.47510-1-alexander.sverdlin@nokia.com> <20210127203627.47510-2-alexander.sverdlin@nokia.com> 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 Thu, Jan 28, 2021 at 03:57:58PM +0100, Peter Zijlstra wrote: > On Thu, Jan 28, 2021 at 12:52:22PM +0100, Alexander Sverdlin wrote: > > Hello Peter, > > > > On 28/01/2021 12:33, Peter Zijlstra wrote: > > > This, from commit 6b07d38aaa52 ("MIPS: Octeon: Use optimized memory > > > barrier primitives."): > > > > > > #define smp_mb__before_llsc() smp_wmb() > > > #define __smp_mb__before_llsc() __smp_wmb() > > > > > > is also dodgy as hell and really wants a comment too. I'm not buying the > > > Changelog of that commit either, __smp_mb__before_llsc should also > > > ensure the LL cannot happen earlier, but SYNCW has no effect on loads. > > > So what stops the load from being speculated? > > > > hmm, the commit message you point to above, says: > > > > "Since Octeon does not do speculative reads, this functions as a full barrier." > > So then the only difference between SYNC and SYNCW is a pipeline drain? > > I still worry about the transitivity thing.. ISTR that being a sticky > point back then too. Ah, there we are, it's called multi-copy-atomic these days: f1ab25a30ce8 ("memory-barriers: Replace uses of "transitive"") Do those SYNCW / write-completion barriers guarantee this?