All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Joe Perches <joe@perches.com>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86 <x86@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-pm <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next v1] x86/apic: Reduce print level of CPU limit announcement
Date: Wed, 27 Mar 2019 12:11:33 +0200	[thread overview]
Message-ID: <20190327101133.GQ22899@mtr-leonro.mtl.com> (raw)
In-Reply-To: <20190327095337.GP22899@mtr-leonro.mtl.com>

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

On Wed, Mar 27, 2019 at 11:53:37AM +0200, Leon Romanovsky wrote:
> On Wed, Mar 27, 2019 at 02:49:02AM -0700, Joe Perches wrote:
> > On Wed, 2019-03-27 at 11:38 +0200, Leon Romanovsky wrote:
> > > On Wed, Mar 27, 2019 at 02:17:40AM -0700, Joe Perches wrote:
> > > > On Wed, 2019-03-27 at 11:09 +0200, Leon Romanovsky wrote:
> > > > > Kernel is booted with less possible CPUs (possible_cpus kernel boot
> > > > > option) than available CPUs will have prints like this:
> > > > []
> > > > > diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> > > > []
> > > > > @@ -2305,9 +2305,9 @@ int generic_processor_info(int apicid, int version)
> > > > >  	if (num_processors >= nr_cpu_ids) {
> > > > >  		int thiscpu = max + disabled_cpus;
> > > > >
> > > > > -		pr_warning("APIC: NR_CPUS/possible_cpus limit of %i "
> > > > > -			   "reached. Processor %d/0x%x ignored.\n",
> > > > > -			   max, thiscpu, apicid);
> > > > > +		pr_debug(
> > > > > +			"APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
> > > > > +			max, thiscpu, apicid);
> > > >
> > > > 2 lines please
> > > >
> > > > 		pr_debug("APIC: etc...",
> > > > 			 max, thiscpu, ...);
> > >
> > > It was two lines before, but I changed for two reasons:
> > >  * It helped me to grep the source code to find the origin of dmesg warning.
> > >  * i got checkpatch warning about spitted string, can you please fix checkpatch do not complain?
> >
> > Yes, use
> >
> > 	pr_debug("APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
> > 		 max, thiscpu, apicid);
>
> Ahh, I see, I got such change from clang formatter.
>
> >
> > or better
> >
> > 	printk(KERN_DEBUG "APIC: NR_CPUS/possible_cpus limit of %i reached. Processor %d/0x%x ignored.\n",
> > 	       max, thiscpu, apicid);
> >
> > > > And this would probably be better as
> > > >
> > > > 		printk(KERN_DEBUG "APIC: etc...",
> > > > 		 ...)
> > > >
> > > > to avoid the need to compile with DEBUG or enable
> > > > with CONFIG_DYNAMIC_DEBUG
> > >
> > > You don't need anything like this, just provide dyndbg parameters
> > > through kernel command line.
> >
> > That assumes CONFIG_DYNAMIC_DEBUG is always enabled,
> > and it is not enabled in many .config files.
>
> No problem.

ok, I tested your variant and it still prints a t least on my systems,
so it won't solve my problem. I'll keep this patch as is.

Thanks for the review.

>
> Thanks
>
> >
> >



[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

  reply	other threads:[~2019-03-27 10:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27  9:09 [PATCH -next v1] x86/apic: Reduce print level of CPU limit announcement Leon Romanovsky
2019-03-27  9:17 ` Joe Perches
2019-03-27  9:38   ` Leon Romanovsky
2019-03-27  9:49     ` Joe Perches
2019-03-27  9:53       ` Leon Romanovsky
2019-03-27 10:11         ` Leon Romanovsky [this message]
2019-03-27 10:17           ` Joe Perches
2019-03-27 10:18           ` Borislav Petkov
2019-03-27 10:50             ` Leon Romanovsky
2019-03-27 11:14               ` Borislav Petkov
2019-03-27 11:36                 ` Leon Romanovsky
2019-03-27 11:49                   ` Borislav Petkov
2019-03-27 11:58                     ` Leon Romanovsky

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=20190327101133.GQ22899@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.