scripts/nvmf_perf: Keep track of num_cores for Initiator class
There are multiple cases for counting number of CPU threads on Initiator side. Keep track of num_cores in all of them. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I4b8d1d79a2aa17706d206b149c1c8e8816ae2ef5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6536 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
This commit is contained in:
parent
31c50e110c
commit
42d2e588d6
@ -757,11 +757,13 @@ runtime={run_time}
|
|||||||
cpus_num += len(range(a, b))
|
cpus_num += len(range(a, b))
|
||||||
else:
|
else:
|
||||||
cpus_num += 1
|
cpus_num += 1
|
||||||
threads = range(0, cpus_num)
|
self.num_cores = cpus_num
|
||||||
|
threads = range(0, self.num_cores)
|
||||||
elif hasattr(self, 'num_cores'):
|
elif hasattr(self, 'num_cores'):
|
||||||
self.log_print("Limiting FIO workload execution to %s cores" % self.num_cores)
|
self.log_print("Limiting FIO workload execution to %s cores" % self.num_cores)
|
||||||
threads = range(0, int(self.num_cores))
|
threads = range(0, int(self.num_cores))
|
||||||
else:
|
else:
|
||||||
|
self.num_cores = len(subsystems)
|
||||||
threads = range(0, len(subsystems))
|
threads = range(0, len(subsystems))
|
||||||
|
|
||||||
if "spdk" in self.mode:
|
if "spdk" in self.mode:
|
||||||
|
Loading…
Reference in New Issue
Block a user