From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [RFC][PATCH 0/2] reworking cause_ipi and adding global doorbell support
Date: Tue, 14 Mar 2017 14:35:53 +1000 [thread overview]
Message-ID: <20170314143553.3bb2dab9@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1489463840.2174.25.camel@kernel.crashing.org>
On Tue, 14 Mar 2017 14:57:20 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Tue, 2017-03-14 at 12:53 +1000, Nicholas Piggin wrote:
> > > - Load all
> > > - For each byte if set
> > > - clear byte
> > > - then call handler
> >
> > Yes. I think that will be okay because we shouldn't get any load-hit-
> > store
> > issues. I'll do some benchmarking anyway.
>
> We might need a sync still between clearing the byte and calling the
> handler no ? Or at least a smp_wmb() to ensure that the clear is
> visible before any action of the handler.
Yes I have exactly that (smp_wmb).
At first I checked and cleared each byte then did a single smp_wmb, but
I changed my mind because most of the time the IPI will fire with only
one message set, so it does not seem like it's worth the extra branches
to avoid a lwsync in the rare case of 2 messages.
Thanks,
Nick
next prev parent reply other threads:[~2017-03-14 4:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-12 17:13 [RFC][PATCH 0/2] reworking cause_ipi and adding global doorbell support Nicholas Piggin
2017-03-12 17:13 ` [PATCH 1/2] powerpc/64s: change the doorbell IPI calling convention Nicholas Piggin
2017-03-12 17:13 ` [PATCH 2/2] powerpc/64s: use global doorbell on POWER9 in HV mode Nicholas Piggin
2017-03-13 23:31 ` [RFC][PATCH 0/2] reworking cause_ipi and adding global doorbell support Benjamin Herrenschmidt
2017-03-14 1:49 ` Nicholas Piggin
2017-03-14 2:34 ` Benjamin Herrenschmidt
2017-03-14 2:53 ` Nicholas Piggin
2017-03-14 3:57 ` Benjamin Herrenschmidt
2017-03-14 4:35 ` Nicholas Piggin [this message]
2017-03-14 4:50 ` Benjamin Herrenschmidt
2017-03-14 6:22 ` Nicholas Piggin
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=20170314143553.3bb2dab9@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).