[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1467816641.8360.18.camel@perches.com>
Date: Wed, 06 Jul 2016 07:50:41 -0700
From: Joe Perches <joe@...ches.com>
To: Borislav Petkov <bp@...en8.de>, LKML <linux-kernel@...r.kernel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Franck Bui <fbui@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ingo Molnar <mingo@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Steven Rostedt <rostedt@...dmis.org>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Subject: Re: [PATCH -v3.1 1/2] ratelimit: Extend to print suppressed
messages on release
On Wed, 2016-07-06 at 15:28 +0200, Borislav Petkov wrote:
> Extend the ratelimiting facility to print the amount of suppressed lines
> when it is being released.
[]
> diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
[]
> +static inline void ratelimit_state_exit(struct ratelimit_state *rs)
> +{
> + if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE))
> + return;
> +
> + if (rs->missed)
> + printk(KERN_WARNING "%s: %d output lines suppressed due to ratelimiting\n",
> + current->comm, rs->missed);
Please use pr_warn as it will use whatever
pr_fmt prefix is specified by the subsystem.
Maybe:
if (rs->missed)
pr_warn("ratelimit: %s: %d output lines suppressed\n",
current->comm, rs->missed);
to be more similar to the callback suppressed message in
lib/ratelimit.c
pr_warn("%s: %d callbacks suppressed\n", func, rs->missed);
Powered by blists - more mailing lists