public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-ia64@vger.kernel.org, tony.luck@intel.com,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH] remove empty node at boot time
Date: Tue, 11 Jul 2006 15:37:11 +0000	[thread overview]
Message-ID: <200607110937.11720.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <20060711155538.e15a7a29.kamezawa.hiroyu@jp.fujitsu.com>

On Tuesday 11 July 2006 00:55, KAMEZAWA Hiroyuki wrote:
> On Mon, 10 Jul 2006 11:03:03 -0600
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> 
> > On Sunday 09 July 2006 23:19, KAMEZAWA Hiroyuki wrote:
> > > Could you try this patch ? (against 2.6.18-rc1)
> > 
> > Your patch does fix it.  But I'm worried about removing
> > empty nodes at boot-time.  I want to support the following
> > scenario:
> > 
> >   node 0: 1 enabled CPU, 3 disabled CPUs, no local memory
> >   node 1: 4 disabled CPUs, no local memory
> >   node 2: no CPUs, big interleaved memory across nodes 0 & 1
> > 
> > At run-time, I'd like to be able to enable any or all of the
> > 7 disabled CPUs.  If you remove the "empty" node 1 at boot-time,
> > it sounds like I won't be able to enable its CPUs later.
> > 
> 
> Hmm.. in my understanding, all structures for *possible* cpus are allocated
> at boot time. Then, only problem seems that a cpu is tied to 
> not-exisiting-node at boot time.
> (see arch/ia64/kernel/numa.c, build_cpu_to_node_map())
> 
> ==
> void __init build_cpu_to_node_map(void)
> {
>         int cpu, i, node;
> 
>         for(node=0; node < MAX_NUMNODES; node++)
>                 cpus_clear(node_to_cpu_mask[node]);
> 
>         for(cpu = 0; cpu < NR_CPUS; ++cpu) {
>                 node = -1;
>                 for (i = 0; i < NR_CPUS; ++i)
>                         if (cpu_physical_id(cpu) = node_cpuid[i].phys_id) {
>                                 node = node_cpuid[i].nid;
>                                 break;
>                         }
>                 cpu_to_node_map[cpu] = (node >= 0) ? node : 0; 
>                 if (node >= 0)
>                         cpu_set(cpu, node_to_cpu_mask[node]);
>         }
> }
> ==> 
> Then what we have to do here are
> 1. remap cpu to the first existing node at hot-add event
> or
> 2. implement node-hot-add triggered by cpu-hot-add.
>    Because we already have implemented node-hot-add triggered by memory-hotadd
>    we can do it by small effort.

I haven't paid much attention to the memory/cpu/node hotplug stuff,
but (2) sounds reasonable.

> I think above will work for your environment.
> do you have any idea other than "don't remove empty node at boot time" ?
> or reserve empty node is the best way ?

      reply	other threads:[~2006-07-11 15:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-01 11:04 [PATCH] remove empty node at boot time KAMEZAWA Hiroyuki
2006-07-07 23:26 ` Bjorn Helgaas
2006-07-10  0:34   ` KAMEZAWA Hiroyuki
2006-07-10  2:38     ` Bjorn Helgaas
2006-07-10  3:29       ` KAMEZAWA Hiroyuki
2006-07-10  5:19       ` KAMEZAWA Hiroyuki
2006-07-10 17:03         ` Bjorn Helgaas
2006-07-11  6:55           ` KAMEZAWA Hiroyuki
2006-07-11 15:37             ` Bjorn Helgaas [this message]

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=200607110937.11720.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@osdl.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.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