genirq: Add support for warning on long-running interrupt handlers

Introduce a mechanism to detect and warn about prolonged interrupt handlers.
With a new command-line parameter (irqhandler.duration_warn_us=), users can
configure the duration threshold in microseconds when a warning in such
format should be emitted:

"[CPU14] long duration of IRQ[159:bad_irq_handler [long_irq]], took: 1330 us"

The implementation uses local_clock() to measure the execution duration of the
generic IRQ per-CPU event handler.

Signed-off-by: Wladislav Wiebe <wladislav.wiebe@nokia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/all/20250804093525.851-1-wladislav.wiebe@nokia.com
This commit is contained in:
Wladislav Wiebe
2025-08-04 11:35:25 +02:00
committed by Thomas Gleixner
parent 55b48e23f5
commit 673f1244b3
2 changed files with 53 additions and 1 deletions

View File

@@ -2606,6 +2606,11 @@
for it. Intended to get systems with badly broken
firmware running.
irqhandler.duration_warn_us= [KNL]
Warn if an IRQ handler exceeds the specified duration
threshold in microseconds. Useful for identifying
long-running IRQs in the system.
irqpoll [HW]
When an interrupt is not handled search all handlers
for it. Also check all handlers each timer