From: Antti Palosaari <crope@iki.fi>
To: Hiroshi Doyu <hdoyu@nvidia.com>
Cc: "htl10@users.sourceforge.net" <htl10@users.sourceforge.net>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"joe@perches.com" <joe@perches.com>
Subject: Re: noisy dev_dbg_ratelimited()
Date: Thu, 16 Aug 2012 22:48:45 +0300 [thread overview]
Message-ID: <502D4E9D.5010401@iki.fi> (raw)
In-Reply-To: <20120816.101228.1829061240257077271.hdoyu@nvidia.com>
Hello Hiroshi
On 08/16/2012 10:12 AM, Hiroshi Doyu wrote:
> Hi Antti,
>
> Antti Palosaari <crope@iki.fi> wrote @ Thu, 16 Aug 2012 03:11:56 +0200:
>
>> Hello Hiroshi,
>>
>> I see you have added dev_dbg_ratelimited() recently, commit
>> 6ca045930338485a8cdef117e74372aa1678009d .
>>
>> However it seems to be noisy as expected similar behavior than normal
>> dev_dbg() without a ratelimit.
>>
>> I looked ratelimit.c and there is:
>> printk(KERN_WARNING "%s: %d callbacks suppressed\n", func, rs->missed);
>>
>> What it looks my eyes it will print those "callbacks suppressed" always
>> because KERN_WARNING.
>
> Right. Can the following fix the problem?
No. That silences dev_dbg_reatelimited() totally.
dev_dbg() works as expected printing all the debugs. But when I change
it to dev_dbg_reatelimited() all printings are silenced.
>>From 905b1dedb6c64bc46a70f6d203ef98c23fccb107 Mon Sep 17 00:00:00 2001
> From: Hiroshi Doyu <hdoyu@nvidia.com>
> Date: Thu, 16 Aug 2012 10:02:11 +0300
> Subject: [PATCH 1/1] driver-core: Shut up dev_dbg_reatelimited() without
> DEBUG
>
> dev_dbg_reatelimited() without DEBUG printed "217078 callbacks
> suppressed". This shouldn't print anything without DEBUG.
>
> Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
> Reported-by: Antti Palosaari <crope@iki.fi>
> ---
> include/linux/device.h | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/device.h b/include/linux/device.h
> index eb945e1..d4dc26e 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -962,9 +962,13 @@ do { \
> dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__)
> #define dev_info_ratelimited(dev, fmt, ...) \
> dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__)
> +#if defined(DEBUG)
> #define dev_dbg_ratelimited(dev, fmt, ...) \
> dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__)
> -
> +#else
> +#define dev_dbg_ratelimited(dev, fmt, ...) \
> + no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> +#endif
> /*
> * Stupid hackaround for existing uses of non-printk uses dev_info
> *
>
regards
Antti
--
http://palosaari.fi/
next prev parent reply other threads:[~2012-08-16 19:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 23:39 small regression in mediatree/for_v3.7-3 - media_build Hin-Tak Leung
2012-08-14 23:51 ` Antti Palosaari
2012-08-15 0:44 ` Hin-Tak Leung
2012-08-15 1:05 ` Antti Palosaari
2012-08-16 1:11 ` noisy dev_dbg_ratelimited() [Re: small regression in mediatree/for_v3.7-3 - media_build] Antti Palosaari
2012-08-16 7:12 ` noisy dev_dbg_ratelimited() Hiroshi Doyu
2012-08-16 19:48 ` Antti Palosaari [this message]
2012-08-16 20:29 ` Hin-Tak Leung
2012-08-17 6:00 ` Hiroshi Doyu
2012-11-03 4:14 ` small regression in mediatree/for_v3.7-3 - media_build VDR User
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=502D4E9D.5010401@iki.fi \
--to=crope@iki.fi \
--cc=hdoyu@nvidia.com \
--cc=htl10@users.sourceforge.net \
--cc=joe@perches.com \
--cc=linux-media@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.