linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* small regression in mediatree/for_v3.7-3 - media_build
@ 2012-08-14 23:39 Hin-Tak Leung
  2012-08-14 23:51 ` Antti Palosaari
  0 siblings, 1 reply; 11+ messages in thread
From: Hin-Tak Leung @ 2012-08-14 23:39 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: linux-media

There seems to be a small regression on mediatree/for_v3.7-3
- dmesg/klog get flooded with these:

[201145.140260] dvb_frontend_poll: 15 callbacks suppressed
[201145.586405] usb_urb_complete: 88 callbacks suppressed
[201150.587308] usb_urb_complete: 3456 callbacks suppressed

[201468.630197] usb_urb_complete: 3315 callbacks suppressed
[201473.632978] usb_urb_complete: 3529 callbacks suppressed
[201478.635400] usb_urb_complete: 3574 callbacks suppressed

It seems to be every 5 seconds, but I think that's just klog skipping repeats and collapsing duplicate entries. This does not happen the last time I tried playing with the TV stick :-).

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: small regression in mediatree/for_v3.7-3 - media_build
@ 2012-11-04  8:37 Hin-Tak Leung
  0 siblings, 0 replies; 11+ messages in thread
From: Hin-Tak Leung @ 2012-11-04  8:37 UTC (permalink / raw)
  To: Antti Palosaari, VDR User; +Cc: linux-media

[-- Attachment #1: Type: text/plain, Size: 2829 bytes --]

--- On Sat, 3/11/12, VDR User <user.vdr@gmail.com> wrote:

> On Tue, Aug 14, 2012 at 4:51 PM,
> Antti Palosaari <crope@iki.fi>
> wrote:
> >> There seems to be a small regression on
> mediatree/for_v3.7-3
> >> - dmesg/klog get flooded with these:
> >>
> >> [201145.140260] dvb_frontend_poll: 15 callbacks
> suppressed
> >> [201145.586405] usb_urb_complete: 88 callbacks
> suppressed
> >> [201150.587308] usb_urb_complete: 3456 callbacks
> suppressed
> >>
> >> [201468.630197] usb_urb_complete: 3315 callbacks
> suppressed
> >> [201473.632978] usb_urb_complete: 3529 callbacks
> suppressed
> >> [201478.635400] usb_urb_complete: 3574 callbacks
> suppressed
> >>
> >> It seems to be every 5 seconds, but I think that's
> just klog skipping
> >> repeats and collapsing duplicate entries. This does
> not happen the last time
> >> I tried playing with the TV stick :-).
> >
> > That's because you has dynamic debugs enabled!
> > modprobe dvb_core; echo -n 'module dvb_core +p' >
> > /sys/kernel/debug/dynamic_debug/control
> > modprobe dvb_usbv2; echo -n 'module dvb_usbv2 +p' >
> > /sys/kernel/debug/dynamic_debug/control
> >
> > If you don't add dvb_core and dvb_usbv2 modules to
> > /sys/kernel/debug/dynamic_debug/control you will not
> see those.
> 
> I'm getting massive amounts of "dvb_frontend_poll: 20
> callbacks
> suppressed" messages in dmesg also and I definitely did not
> put
> dvb_core or anything else in
> /sys/kernel/debug/dynamic_debug/control.
> For that matter I don't even have a
> /sys/kernel/debug/dynamic_debug/control file.
> 
> > I have added ratelimited version for those few debugs
> that are flooded
> > normally. This suppressed is coming from ratelimit - it
> does not print all
> > those similar debugs.
> 
> I'm using kernel 3.6.3 with media_build from Oct. 21, 2012.
> How I can
> disable those messages? I'd rather not see hundreds,
> possibly
> thousands or millions of those messages. :)

okay, if you had followed the threads further down, you would probably see that I patched the host side copy of device.h, i.e:

/lib/modules/`uname -r `/build/include/linux/device.h

to get around this, since media_build does not use a full dev kernel tree, but uses the host-side copy of the kernel headers.

So you need to apply the patch (attached) to that. i.e.
  cd /lib/modules/`uname -r `/build/include/linux/
  patch -p3 < /tmp/patch

Mind you this messes up your kernel-dev headers. In my case, because that file is part of the fedora distro kernel-devel package, and as soon as I get a new kernel the whole thing is thrown away, so I don't care. But if you compile your own kernel (and hence have your own kernel-devel headers which you want to keep in clean state), you might want to take note about this.

Hope this helps.

[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 3161 bytes --]

commit d572f2958352dbe7b6552511c9e80d15929bfea6
Author: Hiroshi Doyu <hdoyu@nvidia.com>
Date:   Tue Aug 21 06:02:04 2012 +0000

    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.
    
    With CONFIG_DYNAMIC_DEBUG, the print should be configured as expected.
    
    Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
    Reported-by: Antti Palosaari <crope@iki.fi>
    Signed-off-by: Antti Palosaari <crope@iki.fi>

diff --git a/include/linux/device.h b/include/linux/device.h
index 52a5f15..4d91265 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -946,6 +946,32 @@ int _dev_info(const struct device *dev, const char *fmt, ...)
 
 #endif
 
+/*
+ * Stupid hackaround for existing uses of non-printk uses dev_info
+ *
+ * Note that the definition of dev_info below is actually _dev_info
+ * and a macro is used to avoid redefining dev_info
+ */
+
+#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
+
+#if defined(CONFIG_DYNAMIC_DEBUG)
+#define dev_dbg(dev, format, ...)		     \
+do {						     \
+	dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
+} while (0)
+#elif defined(DEBUG)
+#define dev_dbg(dev, format, arg...)		\
+	dev_printk(KERN_DEBUG, dev, format, ##arg)
+#else
+#define dev_dbg(dev, format, arg...)				\
+({								\
+	if (0)							\
+		dev_printk(KERN_DEBUG, dev, format, ##arg);	\
+	0;							\
+})
+#endif
+
 #define dev_level_ratelimited(dev_level, dev, fmt, ...)			\
 do {									\
 	static DEFINE_RATELIMIT_STATE(_rs,				\
@@ -969,33 +995,21 @@ 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(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
 #define dev_dbg_ratelimited(dev, fmt, ...)				\
-	dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__)
-
-/*
- * Stupid hackaround for existing uses of non-printk uses dev_info
- *
- * Note that the definition of dev_info below is actually _dev_info
- * and a macro is used to avoid redefining dev_info
- */
-
-#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
-
-#if defined(CONFIG_DYNAMIC_DEBUG)
-#define dev_dbg(dev, format, ...)		     \
-do {						     \
-	dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
+do {									\
+	static DEFINE_RATELIMIT_STATE(_rs,				\
+				      DEFAULT_RATELIMIT_INTERVAL,	\
+				      DEFAULT_RATELIMIT_BURST);		\
+	DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);			\
+	if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) &&	\
+	    __ratelimit(&_rs))						\
+		__dynamic_pr_debug(&descriptor, pr_fmt(fmt),		\
+				   ##__VA_ARGS__);			\
 } while (0)
-#elif defined(DEBUG)
-#define dev_dbg(dev, format, arg...)		\
-	dev_printk(KERN_DEBUG, dev, format, ##arg)
 #else
-#define dev_dbg(dev, format, arg...)				\
-({								\
-	if (0)							\
-		dev_printk(KERN_DEBUG, dev, format, ##arg);	\
-	0;							\
-})
+#define dev_dbg_ratelimited(dev, fmt, ...)			\
+	no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
 #endif
 
 #ifdef VERBOSE_DEBUG

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-04  8:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
  -- strict thread matches above, loose matches on Subject: below --
2012-11-04  8:37 Hin-Tak Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).