Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp611258pxb; Wed, 27 Jan 2021 16:43:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwWp7K7yOQumBDeU441VfqQZ8wxjMn6I/Jb3iXjRU/WpzpGAjtlt/t8Q4ZzZu8Q3l8xTTJa X-Received: by 2002:a17:906:9499:: with SMTP id t25mr8429376ejx.339.1611794614128; Wed, 27 Jan 2021 16:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611794614; cv=none; d=google.com; s=arc-20160816; b=eNLrIwUz69BGjww8jYJkHvyFc6kaHFrrZaAjj0+Ir8E4B9Id5plq8aZKpqwRN3+t8z WQJFH+AB/dhfEj18+8sVjk4h2lZ/0a3PUr9PmWUOryQ4JIUwoA4PqJYmrEloQORiFeEK IYM6VhJXMNzqC17E/zSSbJQoVws2/k9u9waZATb7SpWv1NzqtHbgfDXQkNitCUcoKxo5 6B2j2FaGL5oNv3SxF397I19CG7WPEQKOh9aCt18PonEc/iv9oeSAmSaQWdZW4i0qMmd0 HOgrRKxaeF8T7atiabFVlYVLSdzASMi3MBssTKZIeXx7p4y/9JpABhDW+rIcml9QHx2Z ijNQ== 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=lByFNuR88RDNsuzHcedrvnGTtel5nV7mTgNs/bJdJiQ=; b=OhnNJokBL2SZT4mU5JSs6Hmbnnv9uvWerb/g9hoUX0xIsN+rR5frkOuzHDWogDA/OQ ik3+TguYpZBBmOpTgXUPWbdn0s77C6Ssh9XC92WCrUQ1xXi+EI0N3YOEXQLtEZbBRYE9 I4CJUj4qxf4lAeuGc4bWhsw16X4gaLCwwCEERAZShUadfZYAL8ajoaApcpXboMJevYFy Fqml0mla1yn+PKYCWzcSo1VAwMaA3pWQpD30D7V1rP3k6FjvC6J8Zbyk23ZUtwPPcGc1 bDdk6kAkbT2Syq4X3dMQWJrXbL63XDlvAnZhFVHm5GwJriHPkUfCd7eK0N4DbYWjyZns F7/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=PwAq2xuF; 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 u22si1560752ejc.544.2021.01.27.16.43.09; Wed, 27 Jan 2021 16:43:34 -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=PwAq2xuF; 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 S231818AbhA0WzS (ORCPT + 99 others); Wed, 27 Jan 2021 17:55:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231749AbhA0WzK (ORCPT ); Wed, 27 Jan 2021 17:55:10 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E84A7C06178A; Wed, 27 Jan 2021 14:35:08 -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=lByFNuR88RDNsuzHcedrvnGTtel5nV7mTgNs/bJdJiQ=; b=PwAq2xuFOaHMMyzEakUXaEWjR9 dFVNMxUZg71O5aUOYVYFV4dTjFpyI18evbjPpGixHqE9Wuwtj493M/L+ip6qc1psfG4C59DnYY9dT BkprR1G9U3kKCVHUuQwhlX0uB+a7jCw6J1q/SRHd5ohDfMfsE4eIO6TK0OzTsCuHaDXPnRVT3t8Ic W7OttOZbBOlOdj2+9qUpE1EUlWVjqPoVJ7+0LJQlKF2sY91gazRBCcfQl+iXaO+osxZ6To3GME31O ZKgL119TLMK1HxgW+0WDyJ5QDolDR6YUU5XdJa/L9tnTbbZdgR7Dixyb5+X+toHkmeDefbsGYrdDQ Tdg0neDw==; 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 1l4tOU-007bNn-Ch; Wed, 27 Jan 2021 22:34: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 B1FF23010C8; Wed, 27 Jan 2021 23:34:33 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 99E132073198D; Wed, 27 Jan 2021 23:34:33 +0100 (CET) Date: Wed, 27 Jan 2021 23:34:33 +0100 From: Peter Zijlstra To: Alexander A 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: <20210127203627.47510-4-alexander.sverdlin@nokia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > Signed-off-by: Alexander Sverdlin > --- > arch/mips/include/asm/spinlock.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h > index 8a88eb2..0a707f3 100644 > --- a/arch/mips/include/asm/spinlock.h > +++ b/arch/mips/include/asm/spinlock.h > @@ -24,6 +24,9 @@ static inline void queued_spin_unlock(struct qspinlock *lock) > /* This could be optimised with ARCH_HAS_MMIOWB */ > mmiowb(); > smp_store_release(&lock->locked, 0); > +#ifdef CONFIG_CPU_CAVIUM_OCTEON > + nudge_writes(); > +#endif > } > > #include > -- > 2.10.2 >