72 lines
2.7 KiB
Diff
72 lines
2.7 KiB
Diff
From 034fb231ff06aa4615b7531a04e4c3e0ce4aa662 Mon Sep 17 00:00:00 2001
|
|
From: Anubhav Shelat <ashelat@redhat.com>
|
|
Date: Fri, 2 Aug 2024 11:46:36 -0400
|
|
Subject: [PATCH 2/2] rteval: run cyclictest using '--default-system' when
|
|
setting idle states
|
|
|
|
When running cyclictest in rteval, cyclictest automatically disables
|
|
idle states. This means whenever the user sets the idle state of a cpu
|
|
list using '--idle-set' it is overridden by cyclictest.
|
|
|
|
To fix this, the variable 'usingCpupower' is appended to the parameter
|
|
dictionary that's passed to the Cyclictest measurement object which executes
|
|
cyclictest in rteval.
|
|
|
|
If '--idle-set' is specified when running rteval,
|
|
'usingCpupower' is set to true and the '--default-system' option is
|
|
appended to the cyclictest command, which will prevent cyclictest from
|
|
disabling cstates.
|
|
|
|
Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
|
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
---
|
|
rteval-cmd | 4 ++++
|
|
rteval/__init__.py | 1 +
|
|
rteval/modules/measurement/cyclictest.py | 3 +++
|
|
3 files changed, 8 insertions(+)
|
|
|
|
diff --git a/rteval-cmd b/rteval-cmd
|
|
index f440a8a22622..4e13d312a24a 100755
|
|
--- a/rteval-cmd
|
|
+++ b/rteval-cmd
|
|
@@ -266,6 +266,10 @@ if __name__ == '__main__':
|
|
| (rtevcfg.debugging and Log.DEBUG)
|
|
logger.SetLogVerbosity(loglev)
|
|
|
|
+ # check if cpupower is being used
|
|
+ if sys.argv.count('--idle-set') > 0:
|
|
+ rtevcfg.update({'usingCpupower': True})
|
|
+
|
|
# Load modules
|
|
loadmods = LoadModules(config, logger=logger)
|
|
measuremods = MeasurementModules(config, logger=logger)
|
|
diff --git a/rteval/__init__.py b/rteval/__init__.py
|
|
index 4d3e0c23e5ab..8ded374d287e 100644
|
|
--- a/rteval/__init__.py
|
|
+++ b/rteval/__init__.py
|
|
@@ -119,6 +119,7 @@ class RtEval(rtevalReport):
|
|
'memsize':self._sysinfo.mem_get_size(),
|
|
'numanodes':self._sysinfo.mem_get_numa_nodes(),
|
|
'duration': float(self.__rtevcfg.duration),
|
|
+ 'usingCpupower': self.__rtevcfg.usingCpupower
|
|
}
|
|
|
|
if self._loadmods:
|
|
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
|
|
index d919058e927f..2e8f6f1870ed 100644
|
|
--- a/rteval/modules/measurement/cyclictest.py
|
|
+++ b/rteval/modules/measurement/cyclictest.py
|
|
@@ -251,6 +251,9 @@ class Cyclictest(rtevalModulePrototype):
|
|
self.__cmd.append(f'-t{self.__numcores}')
|
|
self.__cmd.append(f'-a{self.__cpulist}')
|
|
|
|
+ if (self.__cfg.usingCpupower):
|
|
+ self.__cmd.append('--default-system')
|
|
+
|
|
if 'threads' in self.__cfg and self.__cfg.threads:
|
|
self.__cmd.append(f"-t{int(self.__cfg.threads)}")
|
|
|
|
--
|
|
2.45.2
|
|
|