public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Guenter Roeck <linux@roeck-us.net>, Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH] irq: Guard handle_bad_irq log messages
Date: Sat, 02 Dec 2017 08:52:23 -0800	[thread overview]
Message-ID: <1512233543.6321.15.camel@perches.com> (raw)
In-Reply-To: <1512232141-32275-1-git-send-email-linux@roeck-us.net>

On Sat, 2017-12-02 at 08:29 -0800, Guenter Roeck wrote:
> 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.

Thanks.

There is also dummychip.c

Perhaps this should be updated in the
static inline in kernel/irq/debug.h instead.

> diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
[]
> @@ -28,9 +28,11 @@
>   */
>  void handle_bad_irq(struct irq_desc *desc)
>  {
> +	static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
>  	unsigned int irq = irq_desc_get_irq(desc);
>  
> -	print_irq_desc(irq, desc);
> +	if (__ratelimit(&ratelimit))
> +		print_irq_desc(irq, desc);
>  	kstat_incr_irqs_this_cpu(desc);
>  	ack_bad_irq(irq);
>  }

  reply	other threads:[~2017-12-02 16:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-02 16:29 [PATCH] irq: Guard handle_bad_irq log messages Guenter Roeck
2017-12-02 16:52 ` Joe Perches [this message]
2017-12-02 17:11   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1512233543.6321.15.camel@perches.com \
    --to=joe@perches.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dtor@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mika.westerberg@linux.intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox