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 /tools/xenmon/xenbaked.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 'tools/xenmon/xenbaked.c')
-rw-r--r-- | tools/xenmon/xenbaked.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/xenmon/xenbaked.c b/tools/xenmon/xenbaked.c index 35bc8a89e2..afca2f2168 100644 --- a/tools/xenmon/xenbaked.c +++ b/tools/xenmon/xenbaked.c @@ -460,10 +460,7 @@ unsigned int get_num_cpus(void) xc_interface_close(xc_handle); opts.cpu_freq = (double)physinfo.cpu_khz/1000.0; - return (physinfo.threads_per_core * - physinfo.cores_per_socket * - physinfo.sockets_per_node * - physinfo.nr_nodes); + return physinfo.nr_cpus; } |