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 | |
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')
-rw-r--r-- | tools/xm-test/lib/XmTestLib/Xm.py | 6 | ||||
-rw-r--r-- | tools/xm-test/lib/XmTestReport/OSReport.py | 1 |
2 files changed, 2 insertions, 5 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"): diff --git a/tools/xm-test/lib/XmTestReport/OSReport.py b/tools/xm-test/lib/XmTestReport/OSReport.py index 80bb4bed53..4eaa20cae9 100644 --- a/tools/xm-test/lib/XmTestReport/OSReport.py +++ b/tools/xm-test/lib/XmTestReport/OSReport.py @@ -92,7 +92,6 @@ class Machine: xenValues = {"nr_cpus" : "Unknown", "nr_nodes" : "Unknown", - "sockets_per_node" : "Unknown", "cores_per_socket" : "Unknown", "threads_per_core" : "Unknown", "cpu_mhz" : "Unknown", |