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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 7F3F8C433DB for ; Tue, 9 Mar 2021 15:46:47 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BCBF64FB8 for ; Tue, 9 Mar 2021 15:46:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BCBF64FB8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=stgolabs.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Dw01w5Kgfz3cXB for ; Wed, 10 Mar 2021 02:46:44 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=softfail (domain owner discourages use of this host) smtp.mailfrom=stgolabs.net (client-ip=195.135.220.15; helo=mx2.suse.de; envelope-from=dave@stgolabs.net; receiver=) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Dw01Y5QkCz2xy9 for ; Wed, 10 Mar 2021 02:46:23 +1100 (AEDT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C2D41AE84; Tue, 9 Mar 2021 15:46:19 +0000 (UTC) Date: Tue, 9 Mar 2021 07:46:11 -0800 From: Davidlohr Bueso To: Michal =?utf-8?B?U3VjaMOvwr/CvW5law==?= Subject: Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed Message-ID: <20210309154611.kbxzx65auzvmfqnt@offworld> References: <20210309015950.27688-1-dave@stgolabs.net> <20210309015950.27688-4-dave@stgolabs.net> <20210309093912.GW6564@kitsune.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210309093912.GW6564@kitsune.suse.cz> User-Agent: NeoMutt/20201120 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Davidlohr Bueso , peterz@infradead.org, will@kernel.org, linux-kernel@vger.kernel.org, npiggin@gmail.com, mingo@redhat.com, paulus@samba.org, longman@redhat.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, 09 Mar 2021, Michal Such=EF=BF=BDnek wrote: >On Mon, Mar 08, 2021 at 05:59:50PM -0800, Davidlohr Bueso wrote: >> 49a7d46a06c3 (powerpc: Implement smp_cond_load_relaxed()) added >> busy-waiting pausing with a preferred SMT priority pattern, lowering >> the priority (reducing decode cycles) during the whole loop slowpath. >> >> However, data shows that while this pattern works well with simple > ^^^^^^^^^^^^^^^^^^^^^^ >> spinlocks, queued spinlocks benefit more being kept in medium priority, >> with a cpu_relax() instead, being a low+medium combo on powerpc. >... >> >> diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/a= sm/barrier.h >> index aecfde829d5d..7ae29cfb06c0 100644 >> --- a/arch/powerpc/include/asm/barrier.h >> +++ b/arch/powerpc/include/asm/barrier.h >> @@ -80,22 +80,6 @@ do { \ >> ___p1; \ >> }) >> >> -#ifdef CONFIG_PPC64 >Maybe it should be kept for the simple spinlock case then? It is kept, note that simple spinlocks don't use smp_cond_load_relaxed, but instead deal with the priorities in arch_spin_lock(), so it will spin in low priority until it sees a chance to take the lock, where it switches back to medium. Thanks, Davidlohr