From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65A2AC433E0 for ; Wed, 27 Jan 2021 22:55:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F27564DE0 for ; Wed, 27 Jan 2021 22:55:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231785AbhA0WzP (ORCPT ); Wed, 27 Jan 2021 17:55:15 -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-mips@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 >