42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From 4ee01e7b82e348d57621a87b9862ebdfd81aefe8 Mon Sep 17 00:00:00 2001
|
|
From: Tomas Glozar <tglozar@redhat.com>
|
|
Date: Fri, 30 Jun 2023 11:19:05 +0200
|
|
Subject: [PATCH] rteval: Exclude isolcpus from stressng by default
|
|
|
|
Note: this has little effect now, because the cpus variables is only
|
|
used for removing empty nodes unless a cpulist is specified by the user.
|
|
However, this can change in the future.
|
|
|
|
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
rteval/modules/loads/stressng.py | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
|
|
index 85cb473..800fdec 100644
|
|
--- a/rteval/modules/loads/stressng.py
|
|
+++ b/rteval/modules/loads/stressng.py
|
|
@@ -9,6 +9,7 @@ from rteval.Log import Log
|
|
from rteval.systopology import CpuList, SysTopology
|
|
|
|
expand_cpulist = CpuList.expand_cpulist
|
|
+nonisolated_cpulist = CpuList.nonisolated_cpulist
|
|
|
|
class Stressng(CommandLineLoad):
|
|
" This class creates a load module that runs stress-ng "
|
|
@@ -69,6 +70,10 @@ class Stressng(CommandLineLoad):
|
|
# if a cpulist was specified, only allow cpus in that list on the node
|
|
if self.cpulist:
|
|
cpus[n] = [c for c in cpus[n] if c in expand_cpulist(self.cpulist)]
|
|
+ # if a cpulist was not specified, exclude isolated cpus
|
|
+ else:
|
|
+ cpus[n] = CpuList.nonisolated_cpulist(cpus[n])
|
|
+
|
|
|
|
# remove nodes with no cpus available for running
|
|
for node, cpu in cpus.items():
|
|
--
|
|
2.41.0
|
|
|