linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2]  irq: detect slow IRQ handlers
@ 2021-07-15  9:50 Mark Rutland
  2021-07-15  9:50 ` [PATCH v3 1/2] irq: abstract irqaction handler invocation Mark Rutland
  2021-07-15  9:50 ` [PATCH v3 2/2] irq: detect long-running IRQ handlers Mark Rutland
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Rutland @ 2021-07-15  9:50 UTC (permalink / raw)
  To: linux-kernel, tglx; +Cc: mark.rutland, maz, paulmck, peterz

Hi,

While fuzzing arm64 with Syzkaller (under QEMU+KVM) over a number of releases,
I've occasionally seen some ridiculously long stalls (20+ seconds), where it
appears that a CPU is stuck in a hard IRQ context. As this gets detected after
the CPU returns to the interrupted context, it's difficult to identify where
exactly the stall is coming from.

These patches are intended to help tracking this down, with a WARN() if an IRQ
handler takes longer than a given timout (1 second by default), logging the
specific IRQ and handler function. While it's possible to achieve similar with
tracing, it's harder to integrate that into an automated fuzzing setup.

I've been running this for a short while, and haven't yet seen any of the
stalls with this applied, but I've tested with smaller timeout periods in the 1
millisecond range by overloading the host, so I'm confident that the check
works.

Thanks,
Mark.

Since v1 [1]:
* Minor commit message tweaks
* Add Paul's Acked-by
* Trivial rebase to v5.13-rc4

Since v2 [2]:
* Trivial rebase to v5.14-rc1

[1] https://lore.kernel.org/r/20210112135950.30607-1-mark.rutland@arm.com
[2] https://lore.kernel.org/r/20210615102507.9677-1-mark.rutland@arm.com

Mark Rutland (2):
  irq: abstract irqaction handler invocation
  irq: detect long-running IRQ handlers

 kernel/irq/chip.c      | 15 +++----------
 kernel/irq/handle.c    |  4 +---
 kernel/irq/internals.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/Kconfig.debug      | 15 +++++++++++++
 4 files changed, 76 insertions(+), 15 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-15 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15  9:50 [PATCH v3 0/2] irq: detect slow IRQ handlers Mark Rutland
2021-07-15  9:50 ` [PATCH v3 1/2] irq: abstract irqaction handler invocation Mark Rutland
2021-07-15 10:49   ` Peter Zijlstra
2021-07-15 11:15     ` Mark Rutland
2021-07-15 13:10       ` Peter Zijlstra
2021-07-15  9:50 ` [PATCH v3 2/2] irq: detect long-running IRQ handlers Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).