[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210318200233.zov3wbugbgbj4f73@offworld>
Date: Thu, 18 Mar 2021 13:02:33 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Nicholas Piggin <npiggin@...il.com>
Cc: benh@...nel.crashing.org, Davidlohr Bueso <dbueso@...e.de>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
longman@...hat.com, mingo@...hat.com, mpe@...erman.id.au,
paulus@...ba.org, peterz@...radead.org, will@...nel.org
Subject: Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed
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 <npiggin@...il.com>
Thanks,
Davidlohr
Powered by blists - more mailing lists