From: "Michal Suchánek" <msuchanek@suse.de>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: npiggin@gmail.com, Davidlohr Bueso <dbueso@suse.de>,
peterz@infradead.org, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, mingo@redhat.com, paulus@samba.org,
longman@redhat.com, will@kernel.org
Subject: Re: [PATCH 3/3] powerpc/qspinlock: Use generic smp_cond_load_relaxed
Date: Tue, 9 Mar 2021 18:30:26 +0100 [thread overview]
Message-ID: <20210309173026.GB6564@kitsune.suse.cz> (raw)
In-Reply-To: <20210309154611.kbxzx65auzvmfqnt@offworld>
On Tue, Mar 09, 2021 at 07:46:11AM -0800, Davidlohr Bueso wrote:
> On Tue, 09 Mar 2021, Michal Such�nek 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/asm/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.
Indeed, thanks for the clarification.
Michal
next prev parent reply other threads:[~2021-03-09 17:31 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 [this message]
2021-03-16 4:59 ` Nicholas Piggin
2021-03-18 20:02 ` Davidlohr Bueso
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=20210309173026.GB6564@kitsune.suse.cz \
--to=msuchanek@suse.de \
--cc=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
all inboxes | Powered by JetHome®