mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: kmannth@us.ibm.com
Cc: Andi Kleen <ak@suse.de>,
	akpm@osdl.org, discuss@x86-64.org, haveblue@us.ibm.com,
	linux-kernel@vger.kernel.org, darnok@us.ibm.com,
	lhms-devel@lists.sourceforge.net,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Lhms-devel] [discuss] [Patch] 2/5 in support of hot-add memory x86_64 create arch_find_node
Date: Mon, 31 Jul 2006 16:31:32 +0900	[thread overview]
Message-ID: <20060731152552.B860.Y-GOTO@jp.fujitsu.com> (raw)
In-Reply-To: <20060730111747.6554f7de.kamezawa.hiroyu@jp.fujitsu.com>

> On Sat, 29 Jul 2006 18:25:15 +0200
> Andi Kleen <ak@suse.de> wrote:
> 
> > On Saturday 29 July 2006 04:52, keith mannthey wrote:
> > >   With the advent of the new ACPI hot-plug memory driver and mechanism
> > > is needed to deal with ACPI add memory events that do not contain the
> > > pxm (node) information. I do not believe that the add-event is required
> > > to contain this information so I create a arch_find_node generic layer
> > > used in the generic add_memory function.
> > >
> > >   If add_memory is called with node < 0 arch_find_node is invoked to
> > > fine the correct node to add the memory. This created the generic
> > > construct of arch_find_node.
> > 
> > It would be cleaner to always call add_memory from architecture specific
> > code instead of such ugly hooks
> > 
> Hi,  Keith 
> 
> I don't like insert such a check (nid < 0) in add_memory(), either.
> Could you add it before calling add_memory() ?
> (for example, find_pxm parh in acpi's add memory code.)

Agree.
I think that arch_find_node() should be called in acpi_get_node().

For the time being, I would like to post folloing patch for 2.6.18
to fix returning -1 if _PXM is not defined.
Because, not only your case, but also there might be a case that
hot add code will be executed with NUMA kernel on NON-NUMA box.

Then, arch_find_node() should be add before this line.

Thanks.

-----

 drivers/acpi/numa.c |    4 ++++
 1 files changed, 4 insertions(+)

Index: pxm_find1/drivers/acpi/numa.c
===================================================================
--- pxm_find1.orig/drivers/acpi/numa.c	2006-07-31 14:59:48.000000000 +0900
+++ pxm_find1/drivers/acpi/numa.c	2006-07-31 15:11:06.000000000 +0900
@@ -263,6 +263,10 @@ int acpi_get_node(acpi_handle *handle)
 	if (pxm >= 0)
 		node = acpi_map_pxm_to_node(pxm);
 
+	/* _PXM might not be defined by firmware. */
+	if (node < 0)
+		node = 0;
+
 	return node;
 }
 EXPORT_SYMBOL(acpi_get_node);


-- 
Yasunori Goto 



      reply	other threads:[~2006-07-31  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29  2:52 keith mannthey
2006-07-29 16:25 ` [discuss] " Andi Kleen
2006-07-29 19:38   ` keith mannthey
2006-07-30  2:17   ` KAMEZAWA Hiroyuki
2006-07-31  7:31     ` Yasunori Goto [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=20060731152552.B860.Y-GOTO@jp.fujitsu.com \
    --to=y-goto@jp.fujitsu.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=darnok@us.ibm.com \
    --cc=discuss@x86-64.org \
    --cc=haveblue@us.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kmannth@us.ibm.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome