rteval/rteval-Fix-CPU-count-calculation-for-hackbench.patch
Tomas Glozar 0ab8938885 Added patch set that enables rteval to do load calculations and
reporting correctly on systems with isolated CPUs

jiraProject== RHEL-8681

Signed-off-by: Tomas Glozar <tglozar@redhat.com>
2023-10-05 09:11:46 +02:00

43 lines
1.6 KiB
Diff

From 9c096f32cb35452b3475198fcab8ad4356151e86 Mon Sep 17 00:00:00 2001
From: Tomas Glozar <tglozar@redhat.com>
Date: Fri, 30 Jun 2023 11:19:06 +0200
Subject: [PATCH] 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>
---
rteval/modules/loads/hackbench.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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
--
2.41.0