From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/64: irq_work avoid immediate interrupt when raised with hard irqs enabled
Date: Mon, 9 Apr 2018 20:45:53 +1000 [thread overview]
Message-ID: <20180409204553.414404bf@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1523263589.11062.20.camel@kernel.crashing.org>
On Mon, 09 Apr 2018 18:46:29 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Fri, 2018-04-06 at 00:31 +1000, Nicholas Piggin wrote:
> > irq_work_raise should not schedule the hardware decrementer interrupt
> > unless it is called from NMI context. Doing so often just results in an
> > immediate masked decrementer interrupt:
> >
> > <...>-550 90d... 4us : update_curr_rt <-dequeue_task_rt
> > <...>-550 90d... 5us : dbs_update_util_handler <-update_curr_rt
> > <...>-550 90d... 6us : arch_irq_work_raise <-irq_work_queue
> > <...>-550 90d... 7us : soft_nmi_interrupt <-soft_nmi_common
> > <...>-550 90d... 7us : printk_nmi_enter <-soft_nmi_interrupt
> > <...>-550 90d.Z. 8us : rcu_nmi_enter <-soft_nmi_interrupt
> > <...>-550 90d.Z. 9us : rcu_nmi_exit <-soft_nmi_interrupt
> > <...>-550 90d... 9us : printk_nmi_exit <-soft_nmi_interrupt
> > <...>-550 90d... 10us : cpuacct_charge <-update_curr_rt
> >
> > Set the decrementer pending in the irq_happened mask directly, rather
> > than having the masked decrementer handler do it.
>
> Setting the paca field needs hard irqs off...
Doh! Good catch, I should have noticed that :)
> also preempt_disable
> doesn't look necessary if IRQs are off.
True, just copied from existing code.
Thanks,
Nick
prev parent reply other threads:[~2018-04-09 10:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 14:31 [PATCH] powerpc/64: irq_work avoid immediate interrupt when raised with hard irqs enabled Nicholas Piggin
2018-04-09 8:46 ` Benjamin Herrenschmidt
2018-04-09 10:45 ` Nicholas Piggin [this message]
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=20180409204553.414404bf@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.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).