diff options
author | Dino Madarang <dinox.madarang@intel.com> | 2017-10-19 20:41:05 +0000 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2017-12-14 03:49:22 +0000 |
commit | 8132273c12f1f6e5ce0bbd44cffc8bd642bcb706 (patch) | |
tree | 09bf35a60b26b46b9d644da3c8c13b7b7989b394 | |
parent | 4f0b2293ce25d8311d352bc4f10708d6a1e00c79 (diff) |
NSB: Fix IndexError in pin_vcpu_for_perf
This addresses the IndexError in Standalone SRIOV/OVSDPDK context.
The correct sys_cpu number should be sys_cpu-1
Error:
threads = "%s-%s" % (soc_cpu[socket][sys_cpu], soc_cpu[socket][-1])
IndexError: list index out of range
Tested platform: (Hyper-Threading disabled)
NUMA node0 CPU(s): 0-21
NUMA node1 CPU(s): 22-43
With socket equal to 0, sys_cpu value was 22 which resulted to IndexError.
Change-Id: I36b045cacce4caff4b5ddafaa9b6737f1c6df0a1
Signed-off-by: Dino Simeon Madarang <dinox.madarang@intel.com>
Reviewed-by: Alain Jebara <alain.jebara@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Reviewed-by: Ross Brattain <ross.b.brattain@intel.com>
Reviewed-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
(cherry picked from commit 78fff64b00e255d7e4624bcc62faddc0d135e5a2)
-rw-r--r-- | yardstick/benchmark/contexts/standalone/model.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yardstick/benchmark/contexts/standalone/model.py b/yardstick/benchmark/contexts/standalone/model.py index ffd8858d9..45ae3c18a 100644 --- a/yardstick/benchmark/contexts/standalone/model.py +++ b/yardstick/benchmark/contexts/standalone/model.py @@ -222,7 +222,7 @@ class Libvirt(object): soc_cpu = sys_obj.get_core_socket() sys_cpu = int(soc_cpu["cores_per_socket"]) cores = "%s-%s" % (soc_cpu[socket][0], soc_cpu[socket][sys_cpu - 1]) - if int(soc_cpu["thread_per_core"]): + if int(soc_cpu["thread_per_core"]) > 1: threads = "%s-%s" % (soc_cpu[socket][sys_cpu], soc_cpu[socket][-1]) cpuset = "%s,%s" % (cores, threads) return cpuset |