mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"ananth@in.ibm.com" <ananth@in.ibm.com>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/5] use nr_cpus= to set nr_cpu_ids early
Date: Tue, 12 Jan 2010 11:57:38 -0800	[thread overview]
Message-ID: <86802c441001121157y5cdc1a91g2a66d8591d6fd579@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1001121331590.25925@router.home>

On Tue, Jan 12, 2010 at 11:32 AM, Christoph Lameter
<cl@linux-foundation.org> wrote:
>
> On Tue, 12 Jan 2010, Yinghai Lu wrote:
>
>> on x86, before prefill_possible_map(), nr_cpu_ids will be NR_CPUS aka CONFIG_NR_CPUS
>>
>> add nr_cpus= to set nr_cpu_ids. so we can simulate cpus <=8 on normal config.
>> instead of change NR_CPUS directly.
>
> We already have
>
> maxcpus=x?
>
> Why do we need this twice?

maxcpus only change setup_max_cpus., and if you are using maxcpus=1,
and you have 8 cpus installed, you can put other
cpus back online via /sys/interface.

nr_cpus= is hard limit nr_cpu_ids, so if you have 16 cpus installed,
nr_cpus=8 will make your nr_cpu_ids=8, and you can not put back
other 8 back. and apic mode could stay with logical flat.
this is used to simulate some debug case. for example you have kernel
support physflat, and flat, with CONFIG_NR_CPUS=255. to run that on
system that only have 8 cpus, you will have apic mode in logical flat.
 but if you have run the kernel on system with 32 cpus installed, it
will switch to physflat even you have maxcpus=8 appedded.

YH

  reply	other threads:[~2010-01-12 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 12:09 Yinghai Lu
2010-01-12 12:09 ` [RFC PATCH 3/5] x86: using logical flat for amd cpu too Yinghai Lu
2010-01-12 12:09 ` [RFC PATCH -v2 4/5] x86: according to nr_cpu_ids to decide if need to leave logical flat Yinghai Lu
2010-01-12 12:09 ` [RFC PATCH -v2 2/5] x86: use dmi check to treat disabled cpus as hotplug cpus Yinghai Lu
2010-01-12 12:09 ` [RFC PATCH 5/5] x86: make 32bit apic flat to physflat switch like 64bit Yinghai Lu
2010-01-12 19:32 ` [RFC PATCH 1/5] use nr_cpus= to set nr_cpu_ids early Christoph Lameter
2010-01-12 19:57   ` Yinghai Lu [this message]
2010-01-12 20:31     ` Christoph Lameter
2010-01-12 22:20       ` Yinghai Lu
2010-01-12 20:48 ` Christoph Lameter
2010-01-12 20:57   ` Linus Torvalds
2010-01-12 22:23   ` Yinghai Lu
2010-01-12 22:31   ` Yinghai Lu

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=86802c441001121157y5cdc1a91g2a66d8591d6fd579@mail.gmail.com \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=cl@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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®