genirq: Add support for warning on long-running interrupt handlers
authorWladislav Wiebe <wladislav.wiebe@nokia.com>
Mon, 4 Aug 2025 09:35:25 +0000 (11:35 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 3 Sep 2025 14:10:40 +0000 (16:10 +0200)
commit673f1244b3d47c9b41cda3473c062bec586387be
tree7e6bb3bf68f7f6ea0c1662a20168d01677005f40
parent55b48e23f5c4b6f5ca9b7ab09599b17dcf501c10
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
Documentation/admin-guide/kernel-parameters.txt
kernel/irq/handle.c