mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	"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 12:57:15 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1001121254160.17145@localhost.localdomain> (raw)
In-Reply-To: <alpine.DEB.2.00.1001121436080.25925@router.home>



On Tue, 12 Jan 2010, Christoph Lameter wrote:
>
> Trouble is that NR_CPUS is used all over the place. If nr_cpu_ids < 
> NR_CPUS at boot then there is a danger of for loops to NR_CPUS going out 
> of bounds.
> 
> CONFIG_NR_CPUS is used for various bitmaps so that seems to be okay.
> 
> drivers/acpi/numa.c:acpi_numa_init probably should use nr_cpu_ids 
> instead now.
> 
> There is an octeon driver in staging that has some issues with NR_CPUS 
> as well.

I suspect that this is the real reason for the current behavior of 
'maxcpus=', and that if all of those issues get fixed we could probably 
make maxcpus do what Yinghai's new 'nr_cpus=' does.

So in a perfect world, CONFIG_NR_CPUS's would never really be used, except 
for some fundamental static allocations/limits that are too painful to try 
to make dynamic.

I doubt that anybody really _cares_ about the "you can add them later" 
behavior of the current maxcpus thing, and I suspect that the nr_cpus 
semantics is what people generally would have expected.

			Linus

  reply	other threads:[~2010-01-12 20:59 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
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 [this message]
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=alpine.LFD.2.00.1001121254160.17145@localhost.localdomain \
    --to=torvalds@linux-foundation.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=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

all inboxes | Powered by JetHome®