LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 0/4] make pr_debug() dynamic
@ 2008-02-07 21:03 Jason Baron
  2008-02-07 22:42 ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Baron @ 2008-02-07 21:03 UTC (permalink / raw)
  To: mathieu.desnoyers; +Cc: akpm, mingo, fche, linux-kernel


hi,

make the pr_debug() function dependent upon the new immediate infrastruture.
Thus, b/c of the low runtime impact, we can dynamically enable/disable
pr_debug withoug recompiling. Patch allows 'pr_debug=0/1' on the command
line or via /proc/sys/debug/pr_debug.

thanks,

-Jason


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

* Re: [patch 0/4] make pr_debug() dynamic
  2008-02-07 21:03 [patch 0/4] make pr_debug() dynamic Jason Baron
@ 2008-02-07 22:42 ` Joe Perches
  2008-02-08 15:52   ` Jason Baron
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2008-02-07 22:42 UTC (permalink / raw)
  To: Jason Baron; +Cc: mathieu.desnoyers, akpm, mingo, fche, linux-kernel

On Thu, 2008-02-07 at 16:03 -0500, Jason Baron wrote:
> make the pr_debug() function dependent upon the new immediate infrastruture.

What's wrong with klogd -c 8 or equivalent?



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

* Re: [patch 0/4] make pr_debug() dynamic
  2008-02-07 22:42 ` Joe Perches
@ 2008-02-08 15:52   ` Jason Baron
  2008-02-09 22:21     ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Baron @ 2008-02-08 15:52 UTC (permalink / raw)
  To: Joe Perches; +Cc: mathieu.desnoyers, akpm, mingo, fche, linux-kernel

On Thu, Feb 07, 2008 at 02:42:14PM -0800, Joe Perches wrote:
> On Thu, 2008-02-07 at 16:03 -0500, Jason Baron wrote:
> > make the pr_debug() function dependent upon the new immediate infrastruture.
> 
> What's wrong with klogd -c 8 or equivalent?
> 
> 

Setting the loglevel higher, will not make pr_debug() calls visible. The only
way to make them visible right now, is by re-compiling the kernel.

-Jason



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

* Re: [patch 0/4] make pr_debug() dynamic
  2008-02-08 15:52   ` Jason Baron
@ 2008-02-09 22:21     ` Jan Engelhardt
  2008-02-11 16:38       ` Jason Baron
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2008-02-09 22:21 UTC (permalink / raw)
  To: Jason Baron
  Cc: Joe Perches, mathieu.desnoyers, akpm, mingo, fche, linux-kernel


On Feb 8 2008 10:52, Jason Baron wrote:
>On Thu, Feb 07, 2008 at 02:42:14PM -0800, Joe Perches wrote:
>> On Thu, 2008-02-07 at 16:03 -0500, Jason Baron wrote:
>> > make the pr_debug() function dependent upon the new immediate infrastruture.
>> 
>> What's wrong with klogd -c 8 or equivalent?
>
>Setting the loglevel higher, will not make pr_debug() calls visible. The only
>way to make them visible right now, is by re-compiling the kernel.

pr_debug() was IMHO meant to be a compile-time optimization
to throw out debug messages most people do not want.

If you want to switch on/off debugging messages, use
printk(KERN_DEBUG) [with klogd -c something] and not pr_debug!

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

* Re: [patch 0/4] make pr_debug() dynamic
  2008-02-09 22:21     ` Jan Engelhardt
@ 2008-02-11 16:38       ` Jason Baron
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Baron @ 2008-02-11 16:38 UTC (permalink / raw)
  To: Jan Engelhardt
  Cc: Joe Perches, mathieu.desnoyers, akpm, mingo, fche, linux-kernel

On Sat, Feb 09, 2008 at 11:21:58PM +0100, Jan Engelhardt wrote:
> >> 
> >> What's wrong with klogd -c 8 or equivalent?
> >
> >Setting the loglevel higher, will not make pr_debug() calls visible. The only
> >way to make them visible right now, is by re-compiling the kernel.
> 
> pr_debug() was IMHO meant to be a compile-time optimization
> to throw out debug messages most people do not want.
> 
> If you want to switch on/off debugging messages, use
> printk(KERN_DEBUG) [with klogd -c something] and not pr_debug!

true, we could turn pr_debug() calls into printk(KERN_DEBUG) calls, but there
is an overhead to all these extra printk functions calls. The way I have
implemented pr_debug(), there is no function call at all, in the off case.
To me pr_debug() is currently a compile option, b/c there is often a lot of
overhead to having it on. Being able to turn pr_debug() calls off/on in a
production environment, to get debugging data seems very valuable.

thanks,

-Jason

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

end of thread, other threads:[~2008-02-11 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07 21:03 [patch 0/4] make pr_debug() dynamic Jason Baron
2008-02-07 22:42 ` Joe Perches
2008-02-08 15:52   ` Jason Baron
2008-02-09 22:21     ` Jan Engelhardt
2008-02-11 16:38       ` Jason Baron

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).