aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Glozar <tglozar@redhat.com>2023-06-30 11:19:06 +0200
committerJohn Kacur <jkacur@redhat.com>2023-07-25 09:43:47 -0400
commit9c096f32cb35452b3475198fcab8ad4356151e86 (patch)
tree1114e0fc7e7899c3a84651afff288dd3b9e851b8
parent4ee01e7b82e348d57621a87b9862ebdfd81aefe8 (diff)
downloadrteval-9c096f32cb35452b3475198fcab8ad4356151e86.tar.gz
rteval: Fix CPU count calculation for hackbench
Use count from cpulist when specified and all CPUs on node excluding offline ones and isolated ones if not specified. Signed-off-by: Tomas Glozar <tglozar@redhat.com>
-rw-r--r--rteval/modules/loads/hackbench.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index 14e60d1..f5a547e 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -38,6 +38,7 @@ from rteval.Log import Log
from rteval.systopology import CpuList, SysTopology
expand_cpulist = CpuList.expand_cpulist
+isolated_cpulist = CpuList.isolated_cpulist
class Hackbench(CommandLineLoad):
def __init__(self, config, logger):
@@ -77,9 +78,12 @@ class Hackbench(CommandLineLoad):
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
self.cpus[n] = [c for c in self.cpus[n] if c in expand_cpulist(self.cpulist)]
+ # if a cpulist was not specified, exclude isolated cpus
+ else:
+ self.cpus[n] = CpuList.nonisolated_cpulist(self.cpus[n])
# track largest number of cpus used on a node
- node_biggest = len(sysTop.getcpus(int(n)))
+ node_biggest = len(self.cpus[n])
if node_biggest > biggest:
biggest = node_biggest