Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp850150pxf; Thu, 18 Mar 2021 13:04:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymowMyV/eo0fPoWFyPZuYbictoJixX6xQgzOX2HAMWsqumF5CjTSjtEsvv0pjKTt4t0im/ X-Received: by 2002:a17:906:fc1c:: with SMTP id ov28mr313341ejb.342.1616097891685; Thu, 18 Mar 2021 13:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616097891; cv=none; d=google.com; s=arc-20160816; b=K244Mcxn6UoVOptKRRceNedpN0T4nWR2/Nt98kM0T9NKkWZjxxVsek+6d4lATv6M9/ AfEKHtNKIseJnJKqTqi6UfdgViKeFuXH1xSuQZXMkIaR+XfGbV+2Xq1qt5iZuye2CqMk rr+6NNKFXk93aYhlKUZofEr4Q7gh21TvMLARGmxfemhD6DXuJJJz64HfDS8dIMYDMcd8 ruCc4df4KnY125Tj8e+15BW8NI0kWDe1u8G8nIutuf6hNTQA5YQYdd0lhVTu5h8Tc7V7 XWgNRQzXIjAEUURaWWYu5zBQS6smxw+1pQylMngYnPI/4CyeLZTfMRsQtwxf2BOSreqr VPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BQU9PYdYNhUoItblPE5K21HgBHFD7LBgeDvl5O0nPR0=; b=hE3rnot0QXBlufbZboxwDCgcaXJN0rUj4MmQ5rUi6R79jxNbWLGs70wt74Mk3wpnUK dHHR0F+yNiYvSOWIHqxCoWEvz+jtl+f69BbxyXb1IgpB4fs42wrx+GKI/b1aAhm1vNep r/C+DWLU5/6RT/iHYb6SPAt0k58i0uCdm0mFrNUyZzPXnWcxBZzYt/0fVPg8PVCnflnt V9Ax/0pxqpld4GK800u/yWx2GJPNXy09TgH2wqS/IRi7CJJgQpFcmF50kEDKkBG56eIn Mf9+oU4MSSjRdc+ZFAkycOasON3aoLUtR1lEqu4rcCxf4bLg5bDr868PIYTfSl5ckYNh uR3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 i19si2230801ejf.626.2021.03.18.13.04.27; Thu, 18 Mar 2021 13:04:51 -0700 (PDT) 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; 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 S230391AbhCRUDJ (ORCPT + 99 others); Thu, 18 Mar 2021 16:03:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:34858 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbhCRUCo (ORCPT ); Thu, 18 Mar 2021 16:02:44 -0400 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 1FE62ACA8; Thu, 18 Mar 2021 20:02:43 +0000 (UTC) Date: Thu, 18 Mar 2021 13:02:33 -0700 From: Davidlohr Bueso To: Nicholas Piggin Cc: benh@kernel.crashing.org, Davidlohr Bueso , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, longman@redhat.com, mingo@redhat.com, mpe@ellerman.id.au, paulus@samba.org, peterz@infradead.org, will@kernel.org Subject: Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed Message-ID: <20210318200233.zov3wbugbgbj4f73@offworld> References: <20210309015950.27688-1-dave@stgolabs.net> <20210309015950.27688-4-dave@stgolabs.net> <1615870473.h7h4jetmjb.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1615870473.h7h4jetmjb.astroid@bobo.none> User-Agent: NeoMutt/20201120 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Mar 2021, Nicholas Piggin wrote: >One request, could you add a comment in place that references >smp_cond_load_relaxed() so this commit can be found again if >someone looks at it? Something like this > >/* > * smp_cond_load_relaxed was found to have performance problems if > * implemented with spin_begin()/spin_end(). > */ Sure, let me see where I can fit that in and send out a v2. Similarly, but unrelated to this patch, is there any chance we could remove the whole spin_until_cond() machinery and make it specific to powerpc? This was introduced in 2017 and doesn't really have any users outside of powerpc, except for these: drivers/firmware/arm_scmi/driver.c: spin_until_cond(scmi_xfer_done_no_timeout(cinfo, xfer, stop)); drivers/firmware/arm_scmi/shmem.c: spin_until_cond(ioread32(&shmem->channel_status) & drivers/net/ethernet/xilinx/ll_temac_main.c: spin_until_cond(hard_acs_rdy_or_timeout(lp, timeout)); ... which afaict only the xilinx one can actually build on powerpc. Regardless, these could be converted to smp_cond_load_relaxed(), being the more standard way to do optimized busy-waiting, caring more about the family of barriers than ad-hoc SMT priorities. Of course, I have no way of testing any of these changes. >I wonder if it should have a Fixes: tag to the original commit as >well. I'm not sure either. I've actually been informed recently of other workloads that benefit from the revert on large Power9 boxes. So I'll go ahead and add it. > >Otherwise, > >Acked-by: Nicholas Piggin Thanks, Davidlohr