From: Andrew Morton <akpm@osdl.org>
To: Glauber de Oliveira Costa <gcosta@redhat.com>
Cc: dri-devel@lists.sourceforge.net, airlied@linux.ie,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use printk_ratelimit() inside DRM_DEBUG
Date: Wed, 1 Nov 2006 12:06:16 -0800 [thread overview]
Message-ID: <20061101120616.3274bb37.akpm@osdl.org> (raw)
In-Reply-To: <20061101135051.GH17565@redhat.com>
On Wed, 1 Nov 2006 10:50:51 -0300
Glauber de Oliveira Costa <gcosta@redhat.com> wrote:
> the DRM_DEBUG macro can be called within functions very oftenly
> triggered, thus generating lots of message load and potentially
> compromising system
>
> Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
>
> --
> Glauber de Oliveira Costa
> Red Hat Inc.
> "Free as in Freedom"
>
>
> [drm_debug.patch text/plain (444B)]
> --- linux-2.6.18.x86_64/drivers/char/drm/drmP.h.orig 2006-11-01 08:00:18.000000000 -0500
> +++ linux-2.6.18.x86_64/drivers/char/drm/drmP.h 2006-11-01 08:06:27.000000000 -0500
> @@ -185,7 +185,7 @@
> #if DRM_DEBUG_CODE
> #define DRM_DEBUG(fmt, arg...) \
> do { \
> - if ( drm_debug ) \
> + if ( drm_debug && printk_ratelimit() ) \
> printk(KERN_DEBUG \
> "[" DRM_NAME ":%s] " fmt , \
> __FUNCTION__ , ##arg); \
DRM_DEBUG() should be disabled in production code, and enabled only when
developers are developing stuff. In the latter case, the developer wants
to see all the messages.
IOW, don't load the drm module with the `debug' parameter.
prev parent reply other threads:[~2006-11-01 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 13:50 [PATCH] use printk_ratelimit() inside DRM_DEBUG Glauber de Oliveira Costa
2006-11-01 20:06 ` Andrew Morton [this message]
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=20061101120616.3274bb37.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=gcosta@redhat.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox