From: Ingo Molnar <mingo@kernel.org>
To: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>,
Dave Jones <davej@redhat.com>,
the arch/x86 maintainers <x86@kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: disabled APICs being counted as processors ?
Date: Sun, 26 Jan 2014 10:09:26 +0100 [thread overview]
Message-ID: <20140126090926.GB30987@gmail.com> (raw)
In-Reply-To: <CAE9FiQVUKZ2RsQ_BkePfmpXq+Ty3kj+k7h675fHy8Zm1Za=1Zw@mail.gmail.com>
* Yinghai Lu <yinghai@kernel.org> wrote:
> On Sun, Jan 26, 2014 at 12:36 AM, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > No, this message is printed in prefill_possible_map() which
> > _generates_ cpu_possible_map, so '8' is the number of bits in
> > cpu_possible_map.
> >
> > So the problem is that the counting of disabled but hotpluggable CPUs
> > is over-eager. Since I haven't actually seen _true_ hotplug CPU
> > hardware yet, I'd argue we do the change below - allocating space for
> > never-present CPUs is stupid. If there's true hot-plug CPUs around
> > that could come online after we've booted, then we want to know about
> > them explicitly.
> >
> >
> > diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> > index a32da80..75a351a 100644
> > --- a/arch/x86/kernel/smpboot.c
> > +++ b/arch/x86/kernel/smpboot.c
> > @@ -1223,10 +1223,7 @@ __init void prefill_possible_map(void)
> > i = setup_max_cpus ?: 1;
> > if (setup_possible_cpus == -1) {
> > possible = num_processors;
> > -#ifdef CONFIG_HOTPLUG_CPU
> > - if (setup_max_cpus)
> > - possible += disabled_cpus;
> > -#else
> > +#ifndef CONFIG_HOTPLUG_CPU
> > if (possible > i)
> > possible = i;
> > #endif
>
> Agreed.
A question would be kexec and virtualization: do any of those variants
boot a kernel with 'disabled but working' CPUs, which could be
hot-onlined later on?
Thanks,
Ingo
next prev parent reply other threads:[~2014-01-26 9:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 22:13 disabled APICs being counted as processors ? Dave Jones
2014-01-25 7:41 ` Ingo Molnar
2014-01-25 15:30 ` Dave Jones
2014-01-26 6:41 ` David Rientjes
2014-01-26 8:36 ` Ingo Molnar
2014-01-26 8:51 ` Yinghai Lu
2014-01-26 9:09 ` Ingo Molnar [this message]
2014-01-26 9:23 ` David Rientjes
2014-01-26 9:29 ` Ingo Molnar
2014-01-26 9:44 ` David Rientjes
2014-01-25 16:42 ` 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=20140126090926.GB30987@gmail.com \
--to=mingo@kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rientjes@google.com \
--cc=x86@kernel.org \
--cc=yinghai@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