linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Len Brown <lenb@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, X86 ML <x86@kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Len Brown <len.brown@intel.com>, Jason Baron <jbaron@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [PATCH 2/2] x86: speed cpu_up by quirking cpu_init_udelay
Date: Sat, 9 May 2015 09:24:00 +0200	[thread overview]
Message-ID: <20150509072400.GB10106@gmail.com> (raw)
In-Reply-To: <CAJvTdKk3TM1PMUgGeWCxThzVknfBc8xMK-dJkbxJrwkWhjGzLg@mail.gmail.com>


(Resending my reply with more dyn-debug folks Cc:-ed)

* Len Brown <lenb@kernel.org> wrote:

> On Fri, May 8, 2015 at 4:32 AM, Borislav Petkov <bp@alien8.de> wrote:
> 
> >> +     pr_debug("cpu_init_udelay quirk to %d, was %d", new_udelay, init_udelay);
> >
> > Can we make this printk(KERN_DEBUG please?
> >
> > I'd like to be able to slap "debug" on the command line and not 
> > recompile the kernel. And no, dyndbg="file smpboot.c +p" or 
> > whatever the syntax is, simply doesn't scale if I want to see all 
> > debug messages from early boot.

Ugh, so I see we have grown this gem some time ago:

 #if defined(CONFIG_DYNAMIC_DEBUG)
 /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */
 #define pr_debug(fmt, ...) \
         dynamic_pr_debug(fmt, ##__VA_ARGS__)

I didn't even realize it's there and it happend 6 years ago, in a very 
unintuitively titled commit:

  346e15beb534 driver core: basic infrastructure for per-module dynamic debug messages

So in what way does that title tell us that all pr_debug() calls are 
redirected away if CONFIG_DYNAMIC_DEBUG is enabled (which distros do)?

So could we instead either add a dyndbg=all variant, or make 'debug' 
trigger all dynamic_pr_debug() messages?

Because this redirection breaks the whole pr_*() abstraction rather 
fundamentally, dyndebug stealing pr_debug() and hiding debug messages 
when the user specifically asked for them via 'debug' is pretty nasty 
IMHO ...

Thanks,

	Ingo

  parent reply	other threads:[~2015-05-09  7:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08  6:37 [PATCH 0/2 v2] speeding up cpu_up() Len Brown
2015-05-08  6:37 ` [PATCH 1/2] x86: replace cpu_up hard-coded mdelay with variable udelay Len Brown
2015-05-08  6:37   ` [PATCH 2/2] x86: speed cpu_up by quirking cpu_init_udelay Len Brown
2015-05-08  7:51     ` Ingo Molnar
2015-05-08  8:23       ` Borislav Petkov
2015-05-08  8:32     ` Borislav Petkov
2015-05-08 18:15       ` Len Brown
2015-05-08 18:27         ` Borislav Petkov
2015-05-09  7:22         ` Ingo Molnar
2015-05-09  7:24         ` Ingo Molnar [this message]
2015-05-09  8:04           ` Borislav Petkov

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=20150509072400.GB10106@gmail.com \
    --to=mingo@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=gregkh@suse.de \
    --cc=jbaron@redhat.com \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).