diff mbox series

rteval: Don't run hackbench by default on low memory systems

Message ID 20220113183156.165953-1-jkacur@redhat.com
State New
Headers show
Series rteval: Don't run hackbench by default on low memory systems | expand

Commit Message

John Kacur Jan. 13, 2022, 6:31 p.m. UTC
commit cb8263770e4f5834a43db6be8ffb55ffd7f876c9
Changed rteval to allow running on low memory systems by default because
on some machines, such as certain Arm boards, it isn't a problem.

However, on our automated testing systems it is causing problems.

This patch disables running hackbench by default on a low memory system.
In order to allow people to run on a lowmem system where this isn't a
problem, this patch also creates the option
--hackbench-runlowmem=True|False

A user who wants hackbench to run in rteval on a low memory system, only
needs to specify

--hackbench-runlowmem=True

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/modules/loads/hackbench.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index 21a803b8a3cd..ddd1378bac75 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -39,6 +39,7 @@  from rteval.systopology import SysTopology
 
 class Hackbench(CommandLineLoad):
     def __init__(self, config, logger):
+        self.__cfg = config
         CommandLineLoad.__init__(self, "hackbench", config, logger)
 
     def _WorkloadSetup(self):
@@ -56,7 +57,11 @@  class Hackbench(CommandLineLoad):
 
         ratio = float(mem) / float(self.num_cpus)
         if ratio < 0.75:
-            self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio)
+            if self.__cfg.runlowmem:
+                self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio)
+            else:
+                self._log(Log.WARN, "Low memory system (%f GB/core)! Not running hackbench" % ratio)
+                self._donotrun = True
 
         sysTop = SysTopology()
         # get the number of nodes
@@ -198,6 +203,9 @@  def ModuleParameters():
     return {"jobspercore": {"descr": "Number of working threads per CPU core",
                             "default": 5,
                             "metavar": "NUM"},
+            "runlowmem": {"descr": "Run hackbench on machines where low memory is detected",
+                            "default": False,
+                            "metavar": "True|False"}
             }