Re: noisy dev_dbg_ratelimited()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Aug 2012 22:29:43 +0200
Hin-Tak Leung <htl10@xxxxxxxxxxxxxxxxxxxxx> wrote:

> --- On Thu, 16/8/12, Antti Palosaari <crope@xxxxxx> wrote:
> 
> > Hello Hiroshi
> > 
> > On 08/16/2012 10:12 AM, Hiroshi Doyu wrote:
> > > Hi Antti,
> > >
> > > Antti Palosaari <crope@xxxxxx>
> > 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.

I tested again locally. With DEBUG, it prints sometimes with inserting
"...28916 callbacks suppressed", without DEBUG, it doesn't print
anything. This looks the expected behavior. 

> That's probably correct - the patch looks a bit strange... I did not
> try the patch, but had a quick look at the file and noted that in
> include/linux/device.h, "info" (and possibly another level) are
> treated specially... just thought I should mention this.

I may not get your point correctly, but I think that the debug case is
different from the others(info, warn, err...etc) because, the others
always prints anything, but not debug depends on DEBUG. With DEBUG
it's expected to print at least something, and without DEBUG it's
expected to print nothing at all.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux