[PATCH] powerpc/64: irq_work avoid immediate interrupt when raised with hard irqs enabled
Nicholas Piggin
npiggin at gmail.com
Mon Apr 9 20:45:53 AEST 2018
On Mon, 09 Apr 2018 18:46:29 +1000
Benjamin Herrenschmidt <benh at 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
More information about the Linuxppc-dev
mailing list