Re: [PATCH 2/2] timer: really raise softirq if there is irq_work todo

From: Peter Zijlstra
Date: Fri Jan 31 2014 - 15:29:47 EST


On Fri, Jan 31, 2014 at 09:23:52PM +0100, Sebastian Andrzej Siewior wrote:
> Okay, this makes sense. What looked odd was the powerpc implementation
> where they let the timer interrupt expire and call the irq_work from
> the timer interrupt just before the clockevents callback is executed
> (which would invoke the irq_work callback as well).

Ah, so what I remember Paul Mackerras saying was that that was the
easiest way to trigger an interrupt on the local CPU.

ARM runs the things from every IRQ tail IIRC (or maybe only the PMI, I
forget).

> Would it be a win if we would remove the arch specific code and instead
> raise the timer interrupt asap? It sure won't be a win or change for
> -RT but it would allow all architectures to get irq_work done as soon
> as possible in IRQ context (and out of NMI context if I understand
> correct) without an arch specific implementation.

No, because poking at timer hardware on x86 is stupid expensive, whereas
sending a self-IPI through the APIC is tons cheaper.

Also, I don't really want to poke at the fragile x86 timer hardware from
NMI context while we might already be poking at it from another context.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/