powerpc: handle simultaneous interrupts at once
PATCH v2 1/1 powerpc: handle simultaneous interrupts at once
It often happens to have simultaneous interrupts, for instance when having double Ethernet attachment. With the current implementation, we suffer the cost of kernel entry/exit for each interrupt.
This patch introduces a loop in __do_irq() to handle all interrupts at once before returning.
---
Changed from v1(RFC): simplified following remark from benh
arch/powerpc/kernel/irq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/powerpc/kernel/irq.c +5 -1
@@ -522,7 +522,11 @@ void __do_irq(struct pt_regs *regs)if (unlikely (!irq))__this_cpu_inc (irq_stat.spurious_irqs);else -generic_handle_irq (irq); +do { +generic_handle_irq (irq); + + irq = ppc_md.get_irq (); + }while (irq);trace_irq_exit (regs);
Signature · 1 line
2.12.0
Michael Ellerman
AppliedQuoted 9 lines · Christophe Leroy
It often happens to have simultaneous interrupts, for instance when having double Ethernet attachment. With the current implementation, we suffer the cost of kernel entry/exit for each interrupt.
This patch introduces a loop in
__do_irq()to handle all interrupts at once before returning.Signed-off-by Christophe Leroy <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/45cb08f4791ce6a15c54598b4cb73d
cheers
Quoted 6 lines · Michael Ellerman
Quoted 5 lines · Christophe Leroy
It often happens to have simultaneous interrupts, for instance when having double Ethernet attachment. With the current implementation, we suffer the cost of kernel entry/exit for each interrupt.
Quoted 8 lines
Quoted 4 lines
This patch introduces a loop in
__do_irq()to handle all interrupts at once before returning.Signed-off-by Christophe Leroy <[email protected]>Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/45cb08f4791ce6a15c54598b4cb73d
Hrm, I hadn't noticed that patch...
We used to do that and then removed the code for it. There's a cost, sometimes noticeable, to an extra call to ppc_md.get_irq.
Why not have your get_irq (or eoi) implementation set a per-cpu requesting a new spin of the loop ?
We could move the xive force replay stuff to use the same thing.
Ben.