From: Andrew Morton <akpm@osdl.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
"tony.luck@intel.com" <tony.luck@intel.com>,
"linux-ia64@vger.kernel.org" <linux-ia64@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, GOTO <y-goto@jp.fujitsu.com>
Subject: Re: [BUGFIX][PATCH] cpu to node relationship fixup take2 [1/2]
Date: Sat, 23 Sep 2006 00:06:55 +0000 [thread overview]
Message-ID: <20060922170655.bb812edd.akpm@osdl.org> (raw)
In-Reply-To: <20060922170604.745d662a.akpm@osdl.org>
On Fri, 22 Sep 2006 17:06:04 -0700
Andrew Morton <akpm@osdl.org> wrote:
> cpu-to-node-relationship-fixup-take2.patch
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Problem description:
We have additional_cpus= option for allocating possible_cpus. But nid
for possible cpus are not fixed at boot time. cpus which is offlined at
boot or cpus which is not on SRAT is not tied to its node. This will
cause panic at cpu onlining.
Usually, pxm_to_nid() mapping is fixed at boot time by SRAT.
But, unfortunately, some system (my system!) do not include
full SRAT table for possible cpus. (Then, I use
additiona_cpus= option.)
For such possible cpus, pxm<->nid should be fixed at
hot-add. We now have acpi_map_pxm_to_node() which is also
used at boot. It's suitable here.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
arch/ia64/kernel/acpi.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff -puN arch/ia64/kernel/acpi.c~cpu-to-node-relationship-fixup-take2 arch/ia64/kernel/acpi.c
--- a/arch/ia64/kernel/acpi.c~cpu-to-node-relationship-fixup-take2
+++ a/arch/ia64/kernel/acpi.c
@@ -771,16 +771,19 @@ int acpi_map_cpu2node(acpi_handle handle
{
#ifdef CONFIG_ACPI_NUMA
int pxm_id;
+ int nid;
pxm_id = acpi_get_pxm(handle);
-
/*
- * Assuming that the container driver would have set the proximity
- * domain and would have initialized pxm_to_node(pxm_id) && pxm_flag
+ * We don't have cpu-only-node hotadd. But if the system equips
+ * SRAT table, pxm is already found and node is ready.
+ * So, just pxm_to_nid(pxm) is OK.
+ * This code here is for the system which doesn't have full SRAT
+ * table for possible cpus.
*/
- node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id);
-
+ nid = acpi_map_pxm_to_node(pxm_id);
node_cpuid[cpu].phys_id = physid;
+ node_cpuid[cpu].nid = nid;
#endif
return (0);
}
_
next prev parent reply other threads:[~2006-09-23 0:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 6:24 [BUGFIX][PATCH] cpu to node relationship fixup take2 [1/2] KAMEZAWA Hiroyuki
2006-09-22 6:27 ` [BUGFIX][PATCH] cpu to node relationship fixup take2 [2/2] map cpu KAMEZAWA Hiroyuki
2006-09-26 11:23 ` [BUGFIX][PATCH] cpu to node relationship fixup take2 [2/2] map bibo,mao
2006-09-26 11:39 ` KAMEZAWA Hiroyuki
2006-09-26 11:48 ` bibo,mao
2006-09-23 0:06 ` [BUGFIX][PATCH] cpu to node relationship fixup take2 [1/2] Andrew Morton
2006-09-23 0:06 ` Andrew Morton [this message]
2006-09-23 0:07 ` Andrew Morton
2006-09-23 1:06 ` KAMEZAWA Hiroyuki
2006-09-23 1:11 ` KAMEZAWA Hiroyuki
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=20060922170655.bb812edd.akpm@osdl.org \
--to=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 \
--cc=y-goto@jp.fujitsu.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