linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Nathan Lynch <ntl@pobox.com>, Andrew Morton <akpm@osdl.org>,
	Eric Dumazet <dada1@cosmosbay.com>,
	riel@redhat.com, linux-kernel@vger.kernel.org, torvalds@osdl.org,
	mingo@elte.hu, 76306.1226@compuserve.com, wli@holomorphy.com,
	Paul Jackson <pj@sgi.com>,
	jbeulich@novell.com, Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Subject: Re: [PATCH] percpu data: only iterate over possible CPUs
Date: 11 Feb 2006 19:04:59 +0100
Date: Sat, 11 Feb 2006 19:04:59 +0100	[thread overview]
Message-ID: <20060211180459.GA97137@muc.de> (raw)
In-Reply-To: <20060211144929.GA4334@osiris.boeblingen.de.ibm.com>

On Sat, Feb 11, 2006 at 03:49:29PM +0100, Heiko Carstens wrote:
> > > > x86-64 had the same problem, but we now require that you 
> > > > boot with additional_cpus=... for how many you want. Default is 0
> > > > (used to be half available CPUs but that lead to confusion)
> > > 
> > > So introducing the additional_cpus kernel parameter seems to be the way
> > > to go (for XEN probably too). Even though it seems to be a bit odd if the
> > > user specifies both maxcpus=... and additional_cpus=...
> > 
> > With additional_cpus you don't need maxcpus. They are added together.
> 
> How does x86_64 manage to get 'additional_cpus' parsed early enough? As far
> as I can see this is done when parse_args() in start_kernel() gets called,
> but that's after you need the parameter in prefill_possible_map().
> IMHO that should be an early_param and you would need to call
> parse_early_param() from setup_arch(). But then again, maybe I got it all
> wrong.

Yes, you're right - it's added too late to the map right now.
I will fix that. There are no earlyparams unfortunately, except for a 
big hack in setup.c

> But the more interesting question is: what do you do if the command line
> contains both additional_cpus and maxcpus. I was just trying to make some
> sense of this, but the result is questionable.
> I ended up with a cpu_possible_map that has 'present cpus' +
> 'additional_cpus' bits set. And in smp_prepare_cpus I make sure that
> cpu_present_map has not more than max_cpus bits set.
> 
> At least that doesn't break the current semantics of the maxcpus parameter.
> But we're still wasting memory, since it would make sense that the
> cpu_possible_map shouldn't have more than max_cpus bits set.

Yes, maybe it should be a early parameter too. But frankly I see
maxcpus more as a debugging hack or workarouno. I don't think it matters
much  if it's not as efficient as it could be.

-Andi

  reply	other threads:[~2006-02-11 18:05 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200602051959.k15JxoHK001630@hera.kernel.org>
2006-02-07 15:15 ` [PATCH] percpu data: only iterate over possible CPUs Heiko Carstens
2006-02-07 15:31   ` Jens Axboe
2006-02-07 16:25   ` Eric Dumazet
2006-02-07 16:42     ` Linus Torvalds
2006-02-07 17:34       ` Andrew Morton
2006-02-07 17:48         ` Linus Torvalds
2006-02-07 18:30           ` Dipankar Sarma
2006-02-07 18:43             ` Linus Torvalds
2006-02-07 18:53               ` Dipankar Sarma
2006-02-07 19:11                 ` Linus Torvalds
2006-02-08  4:40                   ` Heiko Carstens
2006-02-08  8:55                   ` Ivan Kokshaysky
2006-02-08 22:31 ` Rik van Riel
2006-02-09  1:20   ` Rik van Riel
2006-02-09  3:05   ` Andrew Morton
2006-02-09  3:08     ` Andrew Morton
2006-02-09  4:36       ` Eric Dumazet
2006-02-09  4:45         ` Andrew Morton
2006-02-09  4:56           ` Paul Jackson
2006-02-09 16:08           ` Nathan Lynch
2006-02-09 16:13             ` Heiko Carstens
2006-02-09 16:38               ` Rik van Riel
2006-02-09 16:59               ` Nathan Lynch
2006-02-09 17:37               ` Andi Kleen
2006-02-10 10:05                 ` Heiko Carstens
2006-02-10 10:13                   ` Andi Kleen
2006-02-11 14:49                     ` Heiko Carstens
2006-02-11 18:04                       ` Andi Kleen [this message]
2006-02-09 17:03             ` Ashok Raj
2006-02-09 17:23               ` Nathan Lynch
2006-02-09 18:04               ` Andrew Morton
2006-02-09 18:52                 ` Ashok Raj
2006-02-09 20:37                   ` Andrew Morton
2006-02-09 21:03                     ` Ashok Raj
2006-02-10 10:02                 ` Andi Kleen
2006-02-10 10:42                   ` Andrew Morton
2006-02-10 11:09                     ` Eric Dumazet
2006-02-10 11:23                       ` Andrew Morton
2006-02-10 11:26                         ` Andrew Morton
2006-02-10 14:13                         ` Eric Dumazet
2006-02-11  0:10                           ` Nathan Lynch
2006-02-11  0:25                             ` Andrew Morton
2006-02-10 12:10                     ` Andi Kleen
2006-02-10 19:08                       ` Andrew Morton
2006-02-09  4:39   ` Eric Dumazet
2006-02-09  4:46     ` Nick Piggin
2006-02-09  8:32 Chuck Ebbert
2006-02-09  8:55 ` Paul Jackson
2006-02-09  9:06 ` Andrew Morton
2006-02-09  9:11   ` Andrew Morton
2006-02-09 10:08     ` Heiko Carstens
2006-02-09 10:13       ` Andrew Morton
2006-02-09 10:23         ` Heiko Carstens
2006-02-09 10:31           ` Andrew Morton
2006-02-09 11:47             ` Heiko Carstens
2006-02-09 12:46               ` Eric Dumazet
2006-02-09 13:12                 ` Heiko Carstens
2006-02-09 13:55                   ` Eric Dumazet

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=20060211180459.GA97137@muc.de \
    --to=ak@muc.de \
    --cc=76306.1226@compuserve.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=dada1@cosmosbay.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ntl@pobox.com \
    --cc=pj@sgi.com \
    --cc=riel@redhat.com \
    --cc=torvalds@osdl.org \
    --cc=wli@holomorphy.com \
    /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;
as well as URLs for NNTP newsgroup(s).