public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] add command line init_start_cpus
Date: Tue, 16 Dec 2008 22:18:48 +0100	[thread overview]
Message-ID: <20081216211848.GO14787@elte.hu> (raw)
In-Reply-To: <86802c440812141939s2fe0fd9g5f9899ed9e4f6e6c@mail.gmail.com>


* Yinghai Lu <yinghai@kernel.org> wrote:

> On Sun, Dec 14, 2008 at 4:11 PM, Andi Kleen <andi@firstfloor.org> wrote:
> > Yinghai Lu <yinghai@kernel.org> writes:
> >
> >> Impact: new command line
> >>
> >> so could select cpus to be started during init stage
> >
> > maxcpus=N should do this already, at least for the first N cpus.
> > If you really need a non continuous range of N (why?) then it would
> > be better to fix maxcpus instead of adding a new option.
> 
> it seems it is hard to make maxcpus= to support random cpus selecting 
> and maxcpus=0 looks insane

yes, maxcpus=0 looks sucky. If we want this via a boot option then it 
should be a separate one.

> also maxcpus=1, will disable smp, can you enable other cpus later in 
> user space?

only booting maxcpus=0 or nosmp will disable SMP permanently. maxcpus=1 
should give the boot CPU [if not then we need to fix it], and you can then 
enable an arbitrary permutation of good CPUs via:

  echo 1 > /sys/devices/system/cpu/cpuX/online

as long as you CONFIG_HOTPLUG_CPU enabled.

What _might_ make sense is to introduce badcpus=2,4,6 that would 
permanently disnumerate all the broken CPUs, by striking that mask from 
the possible-cpus-map - inaccessible to hotplugging as well. (Note that by 
naming it in the inverse way the thing gets a whole new quality - the boot 
option in itself explains its purpose.)

	Ingo

      reply	other threads:[~2008-12-16 21:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-14  6:06 [PATCH] add command line init_start_cpus Yinghai Lu
2008-12-14  6:18 ` Andrew Morton
2008-12-14  7:28   ` [PATCH] add init_start_cpus to config boot cpus -v2 Yinghai Lu
2008-12-14  9:55     ` Andrew Morton
2008-12-15  0:11 ` [PATCH] add command line init_start_cpus Andi Kleen
2008-12-15  3:39   ` Yinghai Lu
2008-12-16 21:18     ` Ingo Molnar [this message]

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=20081216211848.GO14787@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.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