From: Davidlohr Bueso <dave@stgolabs.net>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: will@kernel.org, Davidlohr Bueso <dbueso@suse.de>,
peterz@infradead.org, linux-kernel@vger.kernel.org,
mingo@redhat.com, paulus@samba.org, longman@redhat.com,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed
Date: Thu, 18 Mar 2021 13:02:33 -0700 [thread overview]
Message-ID: <20210318200233.zov3wbugbgbj4f73@offworld> (raw)
In-Reply-To: <1615870473.h7h4jetmjb.astroid@bobo.none>
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@gmail.com>
Thanks,
Davidlohr
next prev parent reply other threads:[~2021-03-18 20:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 1:59 [PATCH 0/3] powerpc/qspinlock: Some tuning updates Davidlohr Bueso
2021-03-09 1:59 ` [PATCH 1/3] powerpc/spinlock: Define smp_mb__after_spinlock only once Davidlohr Bueso
2021-03-09 1:59 ` [PATCH 2/3] powerpc/spinlock: Unserialize spin_is_locked Davidlohr Bueso
2021-03-09 1:59 ` [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed Davidlohr Bueso
2021-03-09 9:39 ` Michal Suchánek
2021-03-09 15:46 ` Davidlohr Bueso
2021-03-09 17:30 ` Michal Suchánek
2021-03-16 4:59 ` Nicholas Piggin
2021-03-18 20:02 ` Davidlohr Bueso [this message]
2021-03-18 20:47 ` [PATCH v2] " Davidlohr Bueso
2021-03-31 1:09 ` [PATCH 0/3] powerpc/qspinlock: Some tuning updates Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210318200233.zov3wbugbgbj4f73@offworld \
--to=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).