lkml.org 
[lkml]   [2013]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] printk: pr_debug_ratelimited: check state first to reduce "callbacks suppressed" messages
On Sat, Oct 26, 2013 at 08:41:53PM -0700, Joe Perches wrote:
> pr_debug_ratelimited should be coded similarly to dev_dbg_ratelimited
> to reduce the "callbacks suppressed" messages.
>
> Add #include <linux/dynamic_debug.h> to printk.h. Unfortunately, this
> new #include must be after the prototype/declaration of function printk.
>
> It may be better to split out these _ratelimited declarations into
> a separate file one day.
>
> Any use of these pr_<foo>_ratelimited functions must also have another
> specific #include <ratelimited.h>. Most users have this done indirectly
> via #include <linux/kernel.h>
>
> printk.h may not #include <linux/ratelimit.h> as it causes circular
> dependencies and compilation failures.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> V2: Fix #include dependencies and typos.
>
> Compile tested with and without CONFIG_DYNAMIC_DEBUG

I've tested both patches without CONFIG_DYNAMIC_DEBUG and
with enabled and disabled debugging with CONFIG_DYNAMIC_DEBUG
and everything seems work correctly.

Thanks,
Krzysiek


\
 
 \ /
  Last update: 2013-10-27 11:41    [W:0.120 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site