diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-19 18:00:10 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-19 18:00:10 +0100 |
commit | 07f557cb63359808a29d14b2359f5c9c3e2c4973 (patch) | |
tree | 80354b497066ccea8b09834658d49d9a76ff7fed /xen/arch/x86/sysctl.c | |
parent | f475a034a7560a64416f9fde0f035b74ef3ac2ea (diff) | |
download | xen-07f557cb63359808a29d14b2359f5c9c3e2c4973.tar.gz xen-07f557cb63359808a29d14b2359f5c9c3e2c4973.tar.bz2 xen-07f557cb63359808a29d14b2359f5c9c3e2c4973.zip |
Replace sysctl.physinfo.sockets_per_node with more directly useful
sysctl.physinfo.nr_cpus. This also avoids miscalculation of
sockets_per_node by Xen where the number of CPUs in the system is
clipped.
From: Elizabeth Kon <eak@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/sysctl.c')
-rw-r--r-- | xen/arch/x86/sysctl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xen/arch/x86/sysctl.c b/xen/arch/x86/sysctl.c index e518d4ce49..db94bfd812 100644 --- a/xen/arch/x86/sysctl.c +++ b/xen/arch/x86/sysctl.c @@ -51,10 +51,8 @@ long arch_do_sysctl( cpus_weight(cpu_sibling_map[0]); pi->cores_per_socket = cpus_weight(cpu_core_map[0]) / pi->threads_per_core; + pi->nr_cpus = (u32)num_online_cpus(); pi->nr_nodes = num_online_nodes(); - pi->sockets_per_node = num_online_cpus() / - (pi->nr_nodes * pi->cores_per_socket * pi->threads_per_core); - pi->total_pages = total_pages; pi->free_pages = avail_domheap_pages(); pi->scrub_pages = avail_scrub_pages(); |