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/xm-test/lib/XmTestLib/Xm.py | |
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/xm-test/lib/XmTestLib/Xm.py')
-rw-r--r-- | tools/xm-test/lib/XmTestLib/Xm.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/xm-test/lib/XmTestLib/Xm.py b/tools/xm-test/lib/XmTestLib/Xm.py index 6f1e33c153..6eeab7bb9d 100644 --- a/tools/xm-test/lib/XmTestLib/Xm.py +++ b/tools/xm-test/lib/XmTestLib/Xm.py @@ -218,11 +218,9 @@ def restartXend(): return status def smpConcurrencyLevel(): - cores = int(getInfo("cores_per_socket")) - threads = int(getInfo("threads_per_core")) - sockets = int(getInfo("sockets_per_node")) + nr_cpus = int(getInfo("nr_cpus")) - return cores * sockets * threads + return nr_cpus if __name__ == "__main__": if isDomainRunning("0"): |