Messages in this thread Patch in this message | | | Date | Tue, 23 May 2006 20:03:15 +0900 | From | KAMEZAWA Hiroyuki <> | Subject | [RFC][PATCH] node hotplug [3/3] register_node fix |
| |
create symblic link from newly-added-node to its cpus.
Ideally, node should be onlined before cpu-hot-add. But it cannot be always achieved (at node-hot-add.)
This patch registers cpus to its node when the node is registered.
Signed-Off-By: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
drivers/base/node.c | 7 +++++++ 1 files changed, 7 insertions(+)
Index: linux-2.6.17-rc4-mm3/drivers/base/node.c =================================================================== --- linux-2.6.17-rc4-mm3.orig/drivers/base/node.c 2006-05-23 19:21:26.000000000 +0900 +++ linux-2.6.17-rc4-mm3/drivers/base/node.c 2006-05-23 19:27:27.000000000 +0900 @@ -227,6 +227,7 @@ int register_one_node(int nid) { int error = 0; + int cpu; if (node_online(nid)) { int p_node = parent_node(nid); @@ -236,6 +237,12 @@ parent = &node_devices[p_node]; error = register_node(&node_devices[nid], nid, parent); + + /* link cpu under this node */ + for_each_present_cpu(cpu) { + if (cpu_to_node(cpu) == nid) + register_cpu_under_node(cpu, nid); + } } return error; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |