aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/sysctl.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-07-13 11:45:31 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-07-13 11:45:31 +0100
commit716ffa3e1d7abb7570fa10e04fd05bc41c3734af (patch)
treedc2bc78d311a0d9354beea66a3e4a1d63c8f8c3b /xen/arch/x86/sysctl.c
parentcfbf17ffbb03e8c8501cae1bbba5459450b3447c (diff)
downloadxen-716ffa3e1d7abb7570fa10e04fd05bc41c3734af.tar.gz
xen-716ffa3e1d7abb7570fa10e04fd05bc41c3734af.tar.bz2
xen-716ffa3e1d7abb7570fa10e04fd05bc41c3734af.zip
Move cpu_{sibling,core}_map into per-CPU space
These cpu maps get read from all CPUs, so apart from addressing the square(nr_cpus) growth of these objects, they also get moved into the previously introduced read-mostly sub-section of the per-CPU section, in order to not need to waste a full cacheline in order to align (and properly pad) them, which would be undue overhead on systems with low NR_CPUS. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/sysctl.c')
-rw-r--r--xen/arch/x86/sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/sysctl.c b/xen/arch/x86/sysctl.c
index 651dbcfdd3..27bda34e6e 100644
--- a/xen/arch/x86/sysctl.c
+++ b/xen/arch/x86/sysctl.c
@@ -60,9 +60,9 @@ long arch_do_sysctl(
memset(pi, 0, sizeof(*pi));
pi->cpu_to_node = cpu_to_node_arr;
pi->threads_per_core =
- cpus_weight(cpu_sibling_map[0]);
+ cpus_weight(per_cpu(cpu_sibling_map, 0));
pi->cores_per_socket =
- cpus_weight(cpu_core_map[0]) / pi->threads_per_core;
+ cpus_weight(per_cpu(cpu_core_map, 0)) / pi->threads_per_core;
pi->nr_cpus = (u32)num_online_cpus();
pi->nr_nodes = num_online_nodes();
pi->total_pages = total_pages;