public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: Kamalesh Babulal <kamalesh@linux•vnet.ibm.com>
Cc: linuxppc-dev@lists•ozlabs.org, Anton Blanchard <anton@samba•org>,
	Anshuman Khandual <khandual@linux•vnet.ibm.com>
Subject: Re: [RFC PATCH] powerpc/pseries: Ratelimit EPOW event warnings
Date: Tue, 02 Jun 2015 17:01:57 +1000	[thread overview]
Message-ID: <1433228517.17489.1.camel@ellerman.id.au> (raw)
In-Reply-To: <20150602050320.GA25216@linux.vnet.ibm.com>

On Tue, 2015-06-02 at 10:33 +0530, Kamalesh Babulal wrote:
> * Michael Ellerman <mpe@ellerman•id.au> [2015-06-01 21:26:51]:
> 
> > On Thu, 2015-05-28 at 10:03 +0530, Kamalesh Babulal wrote:
> > > We print the respective warning after parsing EPOW interrupts,
> > > prompting user to take action depending upon the severity of the
> > > event.
> > > 
> > > Some times same EPOW event warning, such as below could flood kernel
> > > log, within very short duration. So Limit the message by using
> > > ratelimit variant of pr_err.
> > > 
> > > May 25 03:46:34 alp kernel: Non critical power or cooling issue cleared
> > > May 25 03:46:52 alp kernel: Non critical power or cooling issue cleared
> > > May 25 03:53:48 alp kernel: Non critical power or cooling issue cleared
> > > May 25 03:55:46 alp kernel: Non critical power or cooling issue cleared
> > > May 25 03:56:34 alp kernel: Non critical power or cooling issue cleared
> > > May 25 03:59:04 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:02:01 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:04:24 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:07:18 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:13:04 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:22:04 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:22:26 alp kernel: Non critical power or cooling issue cleared
> > > May 25 04:22:36 alp kernel: Non critical power or cooling issue cleared
> > 
> > Looking at the time stamps those are actually all fairly far apart in time,
> > aren't they? So do we actually see them within a short duration in practice?
> 
> Thanks for the review. Agree, I should have phrased it better. My intend was to
> say, that these warnings keep flooding the kernel log, over a period of time.

OK. By default printk_ratelimited() allows up to 10 messages in five seconds,
so it won't reduce the number of messages in the above example.

But I'm still OK with a patch to ratelimit them.

> [..]
> > >  	case EPOW_WARN_POWER:
> > > -		pr_err("Non critical power issue reported by firmware");
> > > -		pr_err("Check RTAS error log for details");
> > > +		pr_err_ratelimited("Non critical power issue reported by firmware");
> > > +		pr_err_ratelimited("Check RTAS error log for details");
> > >  		break;
> > 
> > Those last two could be collapsed onto one line which would reduce the spam.
> 
> Yes, it could reduce the number of lines printed. Will resend the patch with the
> changes.

Thanks.

cheers

      reply	other threads:[~2015-06-02  7:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28  4:33 [RFC PATCH] powerpc/pseries: Ratelimit EPOW event warnings Kamalesh Babulal
2015-06-01 11:26 ` Michael Ellerman
2015-06-02  5:03   ` Kamalesh Babulal
2015-06-02  7:01     ` Michael Ellerman [this message]

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=1433228517.17489.1.camel@ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=anton@samba$(echo .)org \
    --cc=kamalesh@linux$(echo .)vnet.ibm.com \
    --cc=khandual@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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