From: Tom Rini <trini@kernel.crashing.org>
To: Robert Love <rml@tech9.net>
Cc: "David S. Miller" <davem@redhat.com>,
akpm@zip.com.au, linux-kernel@vger.kernel.org
Subject: Re: [patch] CONFIG_NR_CPUS
Date: Thu, 6 Jun 2002 10:05:03 -0700 [thread overview]
Message-ID: <20020606170503.GA14252@opus.bloom.county> (raw)
In-Reply-To: <3CFF3504.1DCD24E7@zip.com.au> <20020606.031520.08940800.davem@redhat.com> <1023377213.13787.2.camel@sinai>
On Thu, Jun 06, 2002 at 08:26:52AM -0700, Robert Love wrote:
> On Thu, 2002-06-06 at 03:15, David S. Miller wrote:
>
> > Nice. While you're at it can you fix the value on 64-bit
> > platforms when CONFIG_NR_CPUS is not specified? (it should
> > be 64, not 32)
>
> I agree, this is good. I often am toying with some debugging aid that
> is an array of NR_CPUS and waste a lot of memory with NR_CPUS stuck at
> 32... no reason my kernels should not be set to 2 or whatever I need.
>
> I have attached a patch that is Andrew's + your request, Dave. Since
> what really determines the maximum number of CPUs is the size of
> unsigned long, I used that. Cool?
Here's a (compile) tested version for PPC. arch/ppc/kernel/smp.c makes
much less use of max_cpus, so this should be all that's needed. BTW, on
x86 max_cpus could become __initdata if someone cares..
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
===== arch/ppc/config.in 1.36 vs edited =====
--- 1.36/arch/ppc/config.in Fri May 24 04:15:43 2002
+++ edited/arch/ppc/config.in Thu Jun 6 09:30:39 2002
@@ -172,6 +172,7 @@
bool 'Symmetric multi-processing support' CONFIG_SMP
if [ "$CONFIG_SMP" = "y" ]; then
bool ' Distribute interrupts on all CPUs by default' CONFIG_IRQ_ALL_CPUS
+ int ' Maximum number of CPUs (2-32)' CONFIG_NR_CPUS 32
fi
if [ "$CONFIG_SMP" != "y" ]; then
bool 'Preemptible Kernel' CONFIG_PREEMPT
===== arch/ppc/Config.help 1.10 vs edited =====
--- 1.10/arch/ppc/Config.help Fri May 24 03:38:05 2002
+++ edited/arch/ppc/Config.help Thu Jun 6 09:31:04 2002
@@ -14,6 +14,14 @@
If you don't know what to do here, say N.
+CONFIG_NR_CPUS
+ This allows you to specify the maximum number of CPUs which this
+ kernel will support. The maximum supported value is 32 and the
+ mimimum value which makes sense is 2.
+
+ This is purely to save memory - each supported CPU adds
+ approximately eight kilobytes to the kernel image.
+
CONFIG_PREEMPT
This option reduces the latency of the kernel when reacting to
real-time or interactive events by allowing a low priority process to
next prev parent reply other threads:[~2002-06-06 17:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-06 10:10 [patch] CONFIG_NR_CPUS Andrew Morton
2002-06-06 10:15 ` David S. Miller
2002-06-06 15:26 ` Robert Love
2002-06-06 17:05 ` Tom Rini [this message]
2002-06-06 17:09 ` Adam Kropelin
2002-06-06 17:52 ` Robert Love
2002-06-06 19:48 ` Andrew Morton
2002-06-06 20:55 ` Andreas Dilger
2002-06-06 21:04 ` Andrew Morton
2002-06-06 21:23 ` Thomas 'Dent' Mirlacher
2002-06-06 21:36 ` Dave Jones
2002-06-06 21:49 ` Thomas 'Dent' Mirlacher
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=20020606170503.GA14252@opus.bloom.county \
--to=trini@kernel.crashing.org \
--cc=akpm@zip.com.au \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rml@tech9.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.