All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Robert Love <rml@tech9.net>
Cc: "David S. Miller" <davem@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch] CONFIG_NR_CPUS
Date: Thu, 06 Jun 2002 12:48:57 -0700	[thread overview]
Message-ID: <3CFFBCA9.843C40F0@zip.com.au> (raw)
In-Reply-To: <20020606.031520.08940800.davem@redhat.com> <1023377213.13787.2.camel@sinai>

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?
> 
> ...
> +#define NR_CPUS        (sizeof(unsigned long) * 8)

OK.  What I'll do is:

#ifdef CONFIG_SMP
#define NR_CPUS CONFIG_NR_CPUS
#else
#define NR_CPUS 1
#endif

and then go edit every SMP-capable arch's config.in/Config.help
files.  But the arch maintainers should test one case please - x86
was locking up at boot on quad CPU with NR_CPUS=2.  Others may do
the same.

About a quarter of the bloat is runqueues.  If we could dynamically
allocate those in sched_init() it would be good, because presumably
vendor kernels will be configured for the maximum number of CPUs.

-

  parent reply	other threads:[~2002-06-06 19:51 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
2002-06-06 17:09     ` Adam Kropelin
2002-06-06 17:52       ` Robert Love
2002-06-06 19:48     ` Andrew Morton [this message]
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=3CFFBCA9.843C40F0@zip.com.au \
    --to=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.