* [PATCH v2] irq: Guard handle_bad_irq log messages
@ 2017-12-02 17:13 Guenter Roeck
2017-12-28 11:31 ` [tip:irq/urgent] genirq: " tip-bot for Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Guenter Roeck @ 2017-12-02 17:13 UTC (permalink / raw)
To: Thomas Gleixner
Cc: linux-kernel, Joe Perches, Guenter Roeck, Andy Shevchenko,
Dmitry Torokhov, Mika Westerberg
An interrupt storm on a bad interrupt will cause the kernel
log to be clogged.
[ 60.089234] ->handle_irq(): ffffffffbe2f803f,
[ 60.090455] 0xffffffffbf2af380
[ 60.090510] handle_bad_irq+0x0/0x2e5
[ 60.090522] ->irq_data.chip(): ffffffffbf2af380,
[ 60.090553] IRQ_NOPROBE set
[ 60.090584] ->handle_irq(): ffffffffbe2f803f,
[ 60.090590] handle_bad_irq+0x0/0x2e5
[ 60.090596] ->irq_data.chip(): ffffffffbf2af380,
[ 60.090602] 0xffffffffbf2af380
[ 60.090608] ->action(): (null)
[ 60.090779] handle_bad_irq+0x0/0x2e5
This was seen when running an upstream kernel on Acer Chromebook R11.
The system was unstable as result.
Guard the log message with __printk_ratelimit to reduce the impact.
This won't prevent the interrupt storm from happening, but at least
the system remains stable.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=197953
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Dmitry Torokhov <dtor@chromium.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
v2: Move rate limiting into print_irq_desc()
kernel/irq/debug.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h
index 17f05ef8f575..e4d3819a91cc 100644
--- a/kernel/irq/debug.h
+++ b/kernel/irq/debug.h
@@ -12,6 +12,11 @@
static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
{
+ static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
+
+ if (!__ratelimit(&ratelimit))
+ return;
+
printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
printk("->handle_irq(): %p, ", desc->handle_irq);
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:irq/urgent] genirq: Guard handle_bad_irq log messages
2017-12-02 17:13 [PATCH v2] irq: Guard handle_bad_irq log messages Guenter Roeck
@ 2017-12-28 11:31 ` tip-bot for Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Guenter Roeck @ 2017-12-28 11:31 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux, joe, andriy.shevchenko, dtor, linux-kernel,
mika.westerberg, tglx, hpa
Commit-ID: 11bca0a83f83f6093d816295668e74ef24595944
Gitweb: https://git.kernel.org/tip/11bca0a83f83f6093d816295668e74ef24595944
Author: Guenter Roeck <linux@roeck-us.net>
AuthorDate: Sat, 2 Dec 2017 09:13:04 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 28 Dec 2017 12:28:29 +0100
genirq: Guard handle_bad_irq log messages
An interrupt storm on a bad interrupt will cause the kernel
log to be clogged.
[ 60.089234] ->handle_irq(): ffffffffbe2f803f,
[ 60.090455] 0xffffffffbf2af380
[ 60.090510] handle_bad_irq+0x0/0x2e5
[ 60.090522] ->irq_data.chip(): ffffffffbf2af380,
[ 60.090553] IRQ_NOPROBE set
[ 60.090584] ->handle_irq(): ffffffffbe2f803f,
[ 60.090590] handle_bad_irq+0x0/0x2e5
[ 60.090596] ->irq_data.chip(): ffffffffbf2af380,
[ 60.090602] 0xffffffffbf2af380
[ 60.090608] ->action(): (null)
[ 60.090779] handle_bad_irq+0x0/0x2e5
This was seen when running an upstream kernel on Acer Chromebook R11. The
system was unstable as result.
Guard the log message with __printk_ratelimit to reduce the impact. This
won't prevent the interrupt storm from happening, but at least the system
remains stable.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Dmitry Torokhov <dtor@chromium.org>
Cc: Joe Perches <joe@perches.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=197953
Link: https://lkml.kernel.org/r/1512234784-21038-1-git-send-email-linux@roeck-us.net
---
kernel/irq/debug.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/irq/debug.h b/kernel/irq/debug.h
index 17f05ef..e4d3819 100644
--- a/kernel/irq/debug.h
+++ b/kernel/irq/debug.h
@@ -12,6 +12,11 @@
static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc)
{
+ static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
+
+ if (!__ratelimit(&ratelimit))
+ return;
+
printk("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n",
irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled);
printk("->handle_irq(): %p, ", desc->handle_irq);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-28 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-02 17:13 [PATCH v2] irq: Guard handle_bad_irq log messages Guenter Roeck
2017-12-28 11:31 ` [tip:irq/urgent] genirq: " tip-bot for Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome