public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [BUGFIX][PATCH] cpu to node relationship fixup take2 [1/2]
@ 2006-09-22  6:24 KAMEZAWA Hiroyuki
  2006-09-22  6:27 ` [BUGFIX][PATCH] cpu to node relationship fixup take2 [2/2] map cpu KAMEZAWA Hiroyuki
  2006-09-23  0:06 ` [BUGFIX][PATCH] cpu to node relationship fixup take2 [1/2] Andrew Morton
  0 siblings, 2 replies; 10+ messages in thread
From: KAMEZAWA Hiroyuki @ 2006-09-22  6:24 UTC (permalink / raw)
  To: tony.luck@intel.com; +Cc: Andrew Morton, linux-ia64@vger.kernel.org, LKML, GOTO

I rewrote the whoe patch..

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.

Changelog V1 -> V2
- divded patch into 2 pathces.
- move cpu_to_node relationship fixup before cpu onlining.

Tested on ia64/NUMA system, which has *physical* node-hot-add function.

Future work:  node-hot-add by cpu-hot-add.

-Kame

=
In usual, pxm_to_nid() mapping is fixed at boot time by SRAT.

But, unfortunatelly, 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>

 arch/ia64/kernel/acpi.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Index: linux-2.6.18/arch/ia64/kernel/acpi.c
=================================--- linux-2.6.18.orig/arch/ia64/kernel/acpi.c	2006-09-22 13:39:12.000000000 +0900
+++ linux-2.6.18/arch/ia64/kernel/acpi.c	2006-09-22 14:24:48.000000000 +0900
@@ -771,16 +771,19 @@
 {
 #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);
 }


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-09-26 11:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-09-23  0:07   ` Andrew Morton
2006-09-23  1:06   ` KAMEZAWA Hiroyuki
2006-09-23  1:11     ` KAMEZAWA Hiroyuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox