public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Haicheng Li <haicheng.li@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <andi@firstfloor.org>,
	Suresh.b.siddha@intel.com, lenb@kernel.org, "Zheng,
	Shaohui" <shaohui.zheng@intel.com>,
	linux-kernel@vger.kernel.org, "Chen, Gong" <gong.chen@intel.com>,
	"Lv, Jane" <jane.lv@intel.com>,
	"Li, Haicheng" <haicheng.li@intel.com>
Subject: Re: [PATCH] x86, acpi: map hotadded cpu to correct node.
Date: Wed, 10 Feb 2010 16:40:01 +0100	[thread overview]
Message-ID: <201002101640.01997.trenn@suse.de> (raw)
In-Reply-To: <4B6F7B66.5060404@linux.intel.com>

On Monday 08 February 2010 03:48:06 Haicheng Li wrote:
> hello,
> 
> any comments on this patch? in fact, it's a straightforward bug fix: with existing
> CPU hotadd code, new added CPUs won't be mapped to its own node. especially for hotadding
> a new node with CPU and MEM, new added memories can be mapped to this new node, but new added
> CPUs are always mapped to old nodes. This patch is to fix this obvious bug. thanks.
> 
I can confirm that this patch works as expected:
Tested-by: Thomas Renninger <trenn@suse.de>

While the cores previously showed up on the wrong, already existing
node, they are now added to the correct one.

Be aware that there seem to be other issues (Andi posted some
slab memory hot plug fixes recently).

Find one "nit pick" below:

> -haicheng
> 
> Haicheng Li wrote:
> > x86: map hotadded cpu to correct node.
> > 
> > When hotadd new cpu to system, if its affinitive node is online, should 
> > map the cpu to its own node. otherwise, let kernel select one online 
> > node for the new cpu later.
> > 
> > Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
> > ---
> >  arch/x86/kernel/acpi/boot.c |   21 +++++++++++++++++++++
> >  1 files changed, 21 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
> > index 67e929b..92a4861 100644
> > --- a/arch/x86/kernel/acpi/boot.c
> > +++ b/arch/x86/kernel/acpi/boot.c
> > @@ -49,6 +49,7 @@ EXPORT_SYMBOL(acpi_disabled);
> > 
> >  #ifdef    CONFIG_X86_64
> >  # include <asm/proto.h>
> > +# include <asm/numa_64.h>
> >  #endif                /* X86 */
> > 
> >  #define BAD_MADT_ENTRY(entry, end) (                        \
> > @@ -482,6 +483,25 @@ int acpi_register_gsi(struct device *dev, u32 gsi, 
> > int trigger, int polarity)
> >   */
> >  #ifdef CONFIG_ACPI_HOTPLUG_CPU
> > 
> > +static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
> > +{
> > +#ifdef CONFIG_ACPI_NUMA
> > +    int nid;
> > +
> > +    nid = acpi_get_node(handle);
> > +    if (!node_online(nid))
if (nid == -1 || !node_online(nid))
would avoid passing an invalid param to node_online(..)
node_online() probably already can handle this...
A maintainer eventually could fiddle this into the patch/line
without the need of re-posting.

I am not that familiar with numa node handling, but went the code and
spec up and down a bit. Also assigning a node no. is rather straight
forward, thus I can give this a:
Reviewed-by: Thomas Renninger <trenn@suse.de>

Thanks,

   Thomas

  reply	other threads:[~2010-02-10 15:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <C8EDE645B81E5141A8C6B2F73FD9265117C58A3504@shzsmsx501.ccr.corp.intel.com>
     [not found] ` <20100203220328.GG7510@basil.fritz.box>
2010-02-04 11:06   ` [PATCH] x86, acpi: map hotadded cpu to correct node Haicheng Li
2010-02-08  2:48     ` Haicheng Li
2010-02-10 15:40       ` Thomas Renninger [this message]
2010-02-10 19:39     ` [tip:x86/numa] x86, acpi: Map " tip-bot for Haicheng Li

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=201002101640.01997.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=Suresh.b.siddha@intel.com \
    --cc=andi@firstfloor.org \
    --cc=gong.chen@intel.com \
    --cc=haicheng.li@intel.com \
    --cc=haicheng.li@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jane.lv@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=shaohui.zheng@intel.com \
    --cc=tglx@linutronix.de \
    /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