From: Borislav Petkov <bp@alien8.de>
To: Petr Tesarik <ptesarik@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Jan Beulich <jbeulich@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: Issue a warning if number of present CPUs > maxcpus and CONFIG_HOTPLUG=n
Date: Sun, 16 Feb 2014 18:11:59 +0100 [thread overview]
Message-ID: <20140216171159.GB25047@pd.tnic> (raw)
In-Reply-To: <20140215150223.63bb52fb@hananiah.suse.cz>
On Sat, Feb 15, 2014 at 03:02:23PM +0100, Petr Tesarik wrote:
> Note that the check against i (value passed as maxcpus, but at least 1)
> is repeated further down, including the warning, but since possible is
> already clamped to max_cpus at that time, it is never printed. In fact,
> for the non-hotplug case, the warning about exceeding maxcpus is only
> ever printed if "possible_cpus" was also specified on the command line.
>
> I strongly believe that such limitation was unintentional.
>
> I also changed the message slightly -- the kernel parameter name is
> maxcpus, not max_cpus.
>
> Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
> ---
> arch/x86/kernel/smpboot.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index a32da80..376b6c6 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1226,9 +1226,6 @@ __init void prefill_possible_map(void)
> #ifdef CONFIG_HOTPLUG_CPU
> if (setup_max_cpus)
> possible += disabled_cpus;
> -#else
> - if (possible > i)
> - possible = i;
Hmm, ok, this function is not the easiest to parse and provided I'm not
missing some corner case, the cleanup makes sense to me.
Acked-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2014-02-16 17:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 14:02 Petr Tesarik
2014-02-16 17:11 ` Borislav Petkov [this message]
2014-02-17 8:34 ` Jan Beulich
2014-02-17 10:04 ` Petr Tesarik
2014-02-17 13:40 ` Henrique de Moraes Holschuh
2014-02-17 14:16 ` Petr Tesarik
2014-02-17 19:07 ` Henrique de Moraes Holschuh
2014-02-17 19:31 ` Petr Tesarik
2014-02-17 22:51 ` Henrique de Moraes Holschuh
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=20140216171159.GB25047@pd.tnic \
--to=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jbeulich@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ptesarik@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®