diff options
author | Andi Kleen <ak@suse.de> | 2005-11-05 11:25:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-14 22:55:14 -0500 |
commit | 69d81fcde7797342417591ba7affb372b9c86eae (patch) | |
tree | 97fbc73fd20f8ebc313b2bc41367a8efe36c2c3d /arch/x86_64/kernel/setup.c | |
parent | 50895c5d76e15d8af480eff1aaab5770cabbc2c2 (diff) |
[PATCH] x86_64: Speed up numa_node_id by putting it directly into the PDA
Not go from the CPU number to an mapping array.
Mode number is often used now in fast paths.
This also adds a generic numa_node_id to all the topology includes
Suggested by Eric Dumazet
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r-- | arch/x86_64/kernel/setup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index f27731ac95c5..99cfa751949a 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -823,7 +823,7 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c) | |||
823 | if (!node_online(node)) | 823 | if (!node_online(node)) |
824 | node = nearby_node(apicid); | 824 | node = nearby_node(apicid); |
825 | } | 825 | } |
826 | cpu_to_node[cpu] = node; | 826 | numa_set_node(cpu, node); |
827 | 827 | ||
828 | printk(KERN_INFO "CPU %d(%d) -> Node %d -> Core %d\n", | 828 | printk(KERN_INFO "CPU %d(%d) -> Node %d -> Core %d\n", |
829 | cpu, c->x86_num_cores, node, cpu_core_id[cpu]); | 829 | cpu, c->x86_num_cores, node, cpu_core_id[cpu]); |
@@ -975,7 +975,7 @@ static void srat_detect_node(void) | |||
975 | node = apicid_to_node[hard_smp_processor_id()]; | 975 | node = apicid_to_node[hard_smp_processor_id()]; |
976 | if (node == NUMA_NO_NODE) | 976 | if (node == NUMA_NO_NODE) |
977 | node = 0; | 977 | node = 0; |
978 | cpu_to_node[cpu] = node; | 978 | numa_set_node(cpu, node); |
979 | 979 | ||
980 | if (acpi_numa > 0) | 980 | if (acpi_numa > 0) |
981 | printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node); | 981 | printk(KERN_INFO "CPU %d -> Node %d\n", cpu, node); |