mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: torvalds@osdl.org, frankeh@watson.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: SMP BUG
Date: Wed, 15 Feb 2006 15:46:34 -0800	[thread overview]
Message-ID: <20060215154634.7677edda.akpm@osdl.org> (raw)
In-Reply-To: <20060215233700.GF1508@flint.arm.linux.org.uk>

Russell King <rmk+lkml@arm.linux.org.uk> wrote:
>
> On Wed, Feb 15, 2006 at 03:30:13PM -0800, Andrew Morton wrote:
> > Linus Torvalds <torvalds@osdl.org> wrote:
> > > That said, nobody seemed to comment on this patch by Rik, which seemed to 
> > >  be a nice cleanup regardless of any other issues.
> > 
> > I thought that patch wasn't a good one.  The runqueues should be
> > initialised in sched_init().  init_idle() is called from fork_idle() which
> > is called from the bowels of arch code.  I'm not sure that it gets called
> > at all if !SMP (which seems strange).
> 
> Wouldn't it make sense to do this initialisation in a CPU_UP_PREPARE
> notifier, if not already done?
> 

Could be - we have a couple of notifier handlers in sched.c already,
although they're inside awkward CONFIG_* wrappers.

But architectures need to initialise cpu_possible_map in setup_arch()
anyway, because we immediately call setup_per_cpu_areas(), which needs to
know which CPUs are possible so it will only allocate memory for them.

Yes, architectures can override the generic setup_per_cpu_areas(), but the
same argument applies: they don't want to be allocating memory for
!possible CPUs.

So I think it's sanest to say that the arch shalt initialise cpu_possible_map
in setup_arch().

  reply	other threads:[~2006-02-15 23:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14  0:19 Hubertus Franke
2006-02-15 23:07 ` Russell King
2006-02-15 23:17   ` Andrew Morton
2006-02-15 23:34     ` Russell King
2006-02-15 23:23   ` Linus Torvalds
2006-02-15 23:30     ` Andrew Morton
2006-02-15 23:37       ` Russell King
2006-02-15 23:46         ` Andrew Morton [this message]
2006-02-16  0:14           ` Russell King
2006-02-16  0:28             ` Andrew Morton
2006-02-16  0:52       ` Linus Torvalds
2006-02-16  3:29         ` Nick Piggin
2006-02-16  8:37     ` Ingo Molnar
2006-02-16 10:20     ` Russell King
2006-02-16 15:54       ` Linus Torvalds

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=20060215154634.7677edda.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=frankeh@watson.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=torvalds@osdl.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®