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 <[email protected]>
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]