Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp915506pxb; Thu, 28 Jan 2021 03:39:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmyrX7u+LLAlgvZg6aRtNGsH3DRRgEQVsXwPVXasBz+XZfPYPIt9kTJvPDvJK5JouWL39h X-Received: by 2002:a05:6402:143d:: with SMTP id c29mr13619889edx.274.1611833946712; Thu, 28 Jan 2021 03:39:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611833946; cv=none; d=google.com; s=arc-20160816; b=A0mcdipol5LqovxY9VUMJY/THR55iI4BFOLcmRiRgngkvDZ8EsuB6kb5kI7/8dMTh4 E/KmS8fY9+dMNBjF/err1t7BRfYK123rS2PZA0Yp1H5AqNBraVDewal8p1dcwNO8VCTk pb7NiLpHYwhIV3TYjSjO09X9e6aUAVCFCIYLssc0b+d7HobXopybLl3haC61gnWB9nKC CK2297sAtw4OKqciI1CTZ3F3ClOs1zv1QwQeoVXUFrAn06XBQMKrBfP/tADH0G/hhjHX 3cE8cTTzcqJKeCz+1DTZwVfW+Oa0yG9Ynql8wBtKWky6NDxnOkXPbIOy/EqWwJqhYUmu dRPg== 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=LCSTN/8UXDjc9AWCkufvaxBnoH23ssm9PIa6OBZWVs0=; b=g+Zmi9i06qd643/7I7ozb/M/EMhZTLdwzp4drX0p24apSAsN7+YH3s/yDrIzbGjONa CMv7di9bcxnEgFbvn+n6XvzNFUPoAtUjsyxaNBlCdlm4mqTpCNnte3dntQP4X2I8Dgg5 fPNL7pgJQSBVo0FoU0G0EkOk8Vemafp+fXlzYFyf2RXlUFZ++Qk99ttP4sSxEu11NWfW iRcqfUd1Y5o72IOg7vBLXxyt2/TdO2rf26+s2qNHV7KfG6zPDIlzeMTJAegFspuE8duL bJr/83o99b1sT9Fn4gOq68/0TMwv+sdqpZxw+WUvsQu4u0Zwv5SVV69QI4KaAbptlNsr 59kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Cs0nt6FA; 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 39si2826629edr.358.2021.01.28.03.38.41; Thu, 28 Jan 2021 03:39:06 -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=Cs0nt6FA; 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 S229828AbhA1LgR (ORCPT + 99 others); Thu, 28 Jan 2021 06:36:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbhA1LgL (ORCPT ); Thu, 28 Jan 2021 06:36:11 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F275BC061573; Thu, 28 Jan 2021 03:35:31 -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=LCSTN/8UXDjc9AWCkufvaxBnoH23ssm9PIa6OBZWVs0=; b=Cs0nt6FA04WRG52BZoaUgEgEPt VZFJKD3444qcF2NNe9YJrruWaMuR/U5pQHvDLDf8mDgiu1JcEk8wiMaV7+yenOEMVNtE6q6OodtS7 xLHF9QA7GUAAswa7Xc01lIRgxXF1zRJzRTJiMrraYzReyT399x2H76IHkwhr1hvTbPMs40EN6gOCI izk1SPEvpoFiBIYneJyOv6YAoxJyIxKdgoIDB0xkCMC6lBTydSTPjeeUO2A2fEn6yt7SLibVF2xp4 t9piKrKQM45FC4ODTvRiHxwEt1UDswfRPDtbOtfidkVifVHrB3EiAZDCXepn8h4DGI73/4g8j/46W /JtZP+GA==; 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 1l55Zr-008Od5-Sy; Thu, 28 Jan 2021 11:35:10 +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 5A5933028C8; Thu, 28 Jan 2021 12:35:07 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 42DD121A78F54; Thu, 28 Jan 2021 12:35:07 +0100 (CET) Date: Thu, 28 Jan 2021 12:35:07 +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 3/6] MIPS: Octeon: qspinlock: Flush write buffer Message-ID: References: <20210127203627.47510-1-alexander.sverdlin@nokia.com> <20210127203627.47510-4-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 08:29:57AM +0100, Alexander Sverdlin wrote: > Hi! > > On 27/01/2021 23:34, Peter Zijlstra wrote: > > On Wed, Jan 27, 2021 at 09:36:24PM +0100, Alexander A Sverdlin wrote: > >> From: Alexander Sverdlin > >> > >> Flushing the write buffer brings aroung 10% performace on the tight > >> uncontended spinlock loops on Octeon. Refer to commit 500c2e1fdbcc > >> ("MIPS: Optimize spinlocks."). > > No objection to the patch, but I don't find the above referenced commit > > to be enlightening wrt nudge_writes(). The best it has to offer is the > > comment that's already in the code. > > My point was that original MIPS spinlocks had this write-buffer-flush and > it got lost on the conversion to qspinlocks. The referenced commit just > allows to see the last MIPS-specific implementation before deletion. Hardware that needs a store-buffer flush after release is highly suspect and needs big and explicit comments. Not vague hints.