public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [patch 0/3] dynamic_printk: new feature
Date: Tue, 29 Apr 2008 14:39:35 -0400	[thread overview]
Message-ID: <20080429183935.GA8717@redhat.com> (raw)

hi,

Add the ability to dynamically enable/disable pr_debug()/dev_dbg() in the
kernel. Yes, these calls could be converted to printk(KERN_DEBUG), but there
are enough to cause overhead. Additionally, the logs become difficult to read.
This work is dependent on the CONFIG_DYNAMIC_PRINTK, which when enabled adds
about 1% to the text size of the kernel. Mssages can be dynamically controlled
by module:

echo "add module_name" > /sys/kernel/debug/dynamic_printk/modules
echo "remove module_name" > /sys/kernel/debug/dynamic_printk/modules

There is also a special 'all' value that turns on all the debugging messages.
This 'all' value can also be enabled during boot by passing 'dynamic_printk' on
the kernel command line.

I hope that these patches are useful for people writing new kernel code, for
system debugging and testing. In enabling the 'all' feature on the kernel I was
running i got a bunch of messages...they are pretty interesting in and of
themselves...they could point to error conditions, or further optimizations.

If this patch is accepted, i'd like to convert the myriad 'debug' printks -
DEBUGP(), dprintk(), to a standard format, either pr_debug() or dev_dbg(), to
hook into this mechanism.

thanks,

-Jason



             reply	other threads:[~2008-04-29 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-29 18:39 Jason Baron [this message]
2008-04-30 19:45 ` [patch 0/3] dynamic_printk: new feature Andrew Morton
2008-04-30 20:54   ` Joe Perches
2008-04-30 21:01   ` Jason Baron
2008-05-01  3:44     ` Greg KH
2008-05-01  0:23   ` Nick Andrew

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=20080429183935.GA8717@redhat.com \
    --to=jbaron@redhat.com \
    --cc=akpm@linux-foundation.org \
    --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