public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: dri-devel@lists.sourceforge.net, airlied@linux.ie,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH] use printk_ratelimit() inside DRM_DEBUG
Date: Wed, 1 Nov 2006 10:50:51 -0300	[thread overview]
Message-ID: <20061101135051.GH17565@redhat.com> (raw)

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

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"

[-- Attachment #2: drm_debug.patch --]
[-- Type: text/plain, Size: 443 bytes --]

--- 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);			\

             reply	other threads:[~2006-11-01 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 13:50 Glauber de Oliveira Costa [this message]
2006-11-01 20:06 ` [PATCH] use printk_ratelimit() inside DRM_DEBUG Andrew Morton

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=20061101135051.GH17565@redhat.com \
    --to=gcosta@redhat.com \
    --cc=airlied@linux.ie \
    --cc=akpm@osdl.org \
    --cc=dri-devel@lists.sourceforge.net \
    --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