From 12cc924ab5cf6050546b56f548cff852b6126d43 Mon Sep 17 00:00:00 2001 From: John Kacur Date: Wed, 26 Jan 2022 10:23:22 -0500 Subject: [PATCH] rteval: Rebase to upstream rteval-3.3 - Rebase to upstream rteval-3.3 - Fix case where the threshold assignment is not properly parsed - Increase the default number of buckets from 3000 to 3500 Resolves: rhbz#2012294 Signed-off-by: John Kacur --- .gitignore | 1 + rteval-Add-cyclictest-threshold-USEC.patch | 60 --------- ...of-exclusive-load-module-and-make-st.patch | 79 ------------ ...se-default-buckets-from-2000-to-3500.patch | 60 +++++++++ ...otrun-work-correctly-in-load-modules.patch | 115 ------------------ rteval-Remove-mult-from-hackbench.py.patch | 49 -------- rteval-Remove-self.__err_sleep.patch | 31 ----- ...ement-threads-to-the-cpus-in-cpumask.patch | 35 ------ ...ate-to-using-the-linux-5.13.2-kernel.patch | 65 ---------- ...t.py-Do-not-pass-obsolete-notrace-op.patch | 28 ----- ...t.py-Parse-max-latencies-from-cyclic.patch | 90 -------------- ...t.py-Skip-statistics-reporting-in-ca.patch | 55 --------- ...-cyclictest.py-Sort-the-list-of-cpus.patch | 46 ------- ...ble-running-on-a-system-with-low-mem.patch | 42 ------- rteval.spec | 38 ++---- sources | 2 +- 16 files changed, 73 insertions(+), 723 deletions(-) delete mode 100644 rteval-Add-cyclictest-threshold-USEC.patch delete mode 100644 rteval-Add-idea-of-exclusive-load-module-and-make-st.patch create mode 100644 rteval-Increase-default-buckets-from-2000-to-3500.patch delete mode 100644 rteval-Make-donotrun-work-correctly-in-load-modules.patch delete mode 100644 rteval-Remove-mult-from-hackbench.py.patch delete mode 100644 rteval-Remove-self.__err_sleep.patch delete mode 100644 rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch delete mode 100644 rteval-Update-to-using-the-linux-5.13.2-kernel.patch delete mode 100644 rteval-cyclictest.py-Do-not-pass-obsolete-notrace-op.patch delete mode 100644 rteval-cyclictest.py-Parse-max-latencies-from-cyclic.patch delete mode 100644 rteval-cyclictest.py-Skip-statistics-reporting-in-ca.patch delete mode 100644 rteval-cyclictest.py-Sort-the-list-of-cpus.patch delete mode 100644 rteval-hackbench.py-Enable-running-on-a-system-with-low-mem.patch diff --git a/.gitignore b/.gitignore index ed7888c..3dbd326 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /rteval-3.1.tar.xz /rteval-3.2.tar.xz +/rteval-3.3.tar.xz diff --git a/rteval-Add-cyclictest-threshold-USEC.patch b/rteval-Add-cyclictest-threshold-USEC.patch deleted file mode 100644 index ccd43ba..0000000 --- a/rteval-Add-cyclictest-threshold-USEC.patch +++ /dev/null @@ -1,60 +0,0 @@ -From b902c41fe1688cb767974a5cc6ca337e5ec420e0 Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Wed, 12 Jan 2022 11:01:59 -0500 -Subject: [PATCH] rteval: Add --cyclictest-threshold=USEC - -Add --cyclictest-threshold=USEC -This option causes rteval to exit if latency is greater than USEC - -This is similar to --cyclictest-breaktrace=USEC -and uses the --breaktrace option to cyclictest - -The difference is that --cyclictest-threshold does NOT write a tracemark -when the latency is exceeded - -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index c094df499403..cc74b467913d 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -295,9 +295,12 @@ class Cyclictest(rtevalModulePrototype): - if 'threads' in self.__cfg and self.__cfg.threads: - self.__cmd.append("-t%d" % int(self.__cfg.threads)) - -+ # Should have either breaktrace or threshold, not both - if 'breaktrace' in self.__cfg and self.__cfg.breaktrace: - self.__cmd.append("-b%d" % int(self.__cfg.breaktrace)) - self.__cmd.append("--tracemark") -+ elif 'threshold' in self.__cfg and self.__cfg.threshold: -+ self.__cmd.append("-b%d" % int(self.__cfg.threshold)) - - # Buffer for cyclictest data written to stdout - self.__cyclicoutput = tempfile.SpooledTemporaryFile(mode='w+b') -@@ -411,7 +414,7 @@ class Cyclictest(rtevalModulePrototype): - if self.__breaktraceval: - abrt_n.newProp('reason', 'breaktrace') - btv_n = abrt_n.newChild(None, 'breaktrace', None) -- btv_n.newProp('latency_threshold', str(self.__cfg.breaktrace)) -+ btv_n.newProp('latency_threshold', str(self.__cfg.breaktrace) if self.__cfg.breaktrace else str(self.__cfg.threshold)) - btv_n.newProp('measured_latency', str(self.__breaktraceval)) - abrt = True - -@@ -454,7 +457,10 @@ def ModuleParameters(): - "metavar": "PRIO"}, - "breaktrace": {"descr": "Send a break trace command when latency > USEC", - "default": None, -- "metavar": "USEC"} -+ "metavar": "USEC"}, -+ "threshold": {"descr": "Exit rteval if latency > USEC", -+ "default": None, -+ "metavar": "USEC"} - } - - --- -2.31.1 - diff --git a/rteval-Add-idea-of-exclusive-load-module-and-make-st.patch b/rteval-Add-idea-of-exclusive-load-module-and-make-st.patch deleted file mode 100644 index db22161..0000000 --- a/rteval-Add-idea-of-exclusive-load-module-and-make-st.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 89622562925f432396a07cb8d7bb07da89151f2f Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Thu, 23 Sep 2021 14:12:40 -0400 -Subject: [PATCH 2/7] rteval: Add idea of exclusive load module and make - stress-ng one - -When running stress-ng as a load module in rteval, we don't want to run -kcompile or hackbench, so create the notion of an exclusive load module -and make stress-ng one. - -Signed-off-by: John Kacur ---- - rteval/modules/__init__.py | 21 +++++++++++++++++++++ - rteval/modules/loads/stressng.py | 2 ++ - 2 files changed, 23 insertions(+) - -diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py -index 6ff82d10bf8c..d52dd597186a 100644 ---- a/rteval/modules/__init__.py -+++ b/rteval/modules/__init__.py -@@ -58,6 +58,7 @@ class rtevalModulePrototype(threading.Thread): - "stop": threading.Event(), - "finished": threading.Event()} - self._donotrun = False -+ self._exclusive = False - self.__timestamps = {} - self.__sleeptime = 2.0 - -@@ -75,6 +76,16 @@ class rtevalModulePrototype(threading.Thread): - return self.__ready - - -+ def is_exclusive(self): -+ """ Returns true if this workload should run alone """ -+ return self._exclusive -+ -+ -+ def set_donotrun(self): -+ """ set a module's donotrun field to True """ -+ self._donotrun = True -+ -+ - def _setReady(self, state=True): - """ Sets the ready flag for the module """ - self.__ready = state -@@ -459,7 +470,17 @@ class RtEvalModules: - raise rtevalRuntimeError("No %s modules configured" % self._module_type) - - self._logger.log(Log.INFO, "Preparing %s modules" % self._module_type) -+ exclusive = 0 -+ for (modname, mod) in self.__modules: -+ if mod.is_exclusive() and mod.WorkloadWillRun(): -+ exclusive += 1 - for (modname, mod) in self.__modules: -+ if exclusive >= 1: -+ if exclusive != 1: -+ msg = f"More than one exclusive load: {exclusive}" -+ raise RuntimeError(msg) -+ if not mod.is_exclusive() and mod.WorkloadWillRun(): -+ mod.set_donotrun() - mod.start() - if mod.WorkloadWillRun(): - self._logger.log(Log.DEBUG, "\t - Started %s preparations" % modname) -diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py -index 926de38e3116..d084814142fb 100644 ---- a/rteval/modules/loads/stressng.py -+++ b/rteval/modules/loads/stressng.py -@@ -27,6 +27,8 @@ class Stressng(CommandLineLoad): - self._donotrun = False - else: - self._donotrun = True -+ """ When this module runs, other load modules should not """ -+ self._exclusive = True - - def _WorkloadSetup(self): - " Since there is nothing to build, we don't need to do anything here " --- -2.31.1 - diff --git a/rteval-Increase-default-buckets-from-2000-to-3500.patch b/rteval-Increase-default-buckets-from-2000-to-3500.patch new file mode 100644 index 0000000..e000f59 --- /dev/null +++ b/rteval-Increase-default-buckets-from-2000-to-3500.patch @@ -0,0 +1,60 @@ +From 9dff629f186313beebb96594d236dd9268bef1b1 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Wed, 26 Jan 2022 10:06:33 -0500 +Subject: [PATCH] rteval: Increase default buckets from 2000 to 3500 + +Increase the default buckets from 2000 to 3500 + +With commit 0292c8963611 we skip statistics reporting if we run out of +buckets. Increase the default number of buckets to make this less likely +to occur. + +Signed-off-by: John Kacur +--- + doc/rteval.8 | 2 +- + rteval/modules/measurement/cyclictest.py | 2 +- + rteval/rteval.conf | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/doc/rteval.8 b/doc/rteval.8 +index fa24509ce7e5..25dcfcc298e7 100644 +--- a/doc/rteval.8 ++++ b/doc/rteval.8 +@@ -122,7 +122,7 @@ Measurement thread interval in microseconds (default: 100) + Interval increment in microseconds (default: 0) + .TP + .B \-\-cyclictest-buckets=NBUCKETS +-Number of 1 microsecond histogram buckets (default: 2000) ++Number of 1 microsecond histogram buckets (default: 3500) + .TP + .B \-\-hackbench-jobspercore=N + Number of jobs per online-core for hackbench load +diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py +index af8adeeeb402..5330d1466302 100644 +--- a/rteval/modules/measurement/cyclictest.py ++++ b/rteval/modules/measurement/cyclictest.py +@@ -450,7 +450,7 @@ def ModuleParameters(): + "default": 100, + "metavar": "INTV_US"}, + "buckets": {"descr": "Histogram width", +- "default": 2000, ++ "default": 3500, + "metavar": "NUM"}, + "priority": {"descr": "Run cyclictest with the given priority", + "default": 95, +diff --git a/rteval/rteval.conf b/rteval/rteval.conf +index 7ce6ef0b5acc..aa0a53bcfc63 100644 +--- a/rteval/rteval.conf ++++ b/rteval/rteval.conf +@@ -6,7 +6,7 @@ duration: 60.0 + report_interval: 600 + + [cyclictest] +-buckets: 2000 ++buckets: 3500 + interval: 100 + distance: 0 + priority: 95 +-- +2.34.1 + diff --git a/rteval-Make-donotrun-work-correctly-in-load-modules.patch b/rteval-Make-donotrun-work-correctly-in-load-modules.patch deleted file mode 100644 index 24fa794..0000000 --- a/rteval-Make-donotrun-work-correctly-in-load-modules.patch +++ /dev/null @@ -1,115 +0,0 @@ -From e94a774b8c14e01622b170517eedb9e90232c42c Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Thu, 23 Sep 2021 11:29:24 -0400 -Subject: [PATCH 1/7] rteval: Make donotrun work correctly in load modules - -hackbench and kcompile don't correctly adhere to the donotrun variable -which is inherited from class rtevalModulePrototype. If the variable is set -after the modules are loaded, although the modules do not run, some -thread accounting still occurs which causes problems on shutdown of -rteval. - -Fix in the methods in hackbench and kcompile where this is relevant, by -checking the variable before the method runs. - -While we are at it fix a few other things -- change len(threading.enumerate()) to threading.active_count() -- Fix a spelling typo - -This patch is in preparation for a patch to allow stress-ng to run as a -load module without running other modules. - -Signed-off-by: John Kacur ---- - rteval/__init__.py | 4 ++-- - rteval/modules/loads/__init__.py | 2 +- - rteval/modules/loads/hackbench.py | 3 +++ - rteval/modules/loads/kcompile.py | 9 +++++++++ - 4 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/rteval/__init__.py b/rteval/__init__.py -index 5faed23bc927..22af8e85d5aa 100644 ---- a/rteval/__init__.py -+++ b/rteval/__init__.py -@@ -208,7 +208,7 @@ class RtEval(rtevalReport): - report_interval = int(self.__rtevcfg.report_interval) - if with_loads: - self._loadmods.Unleash() -- nthreads = len(threading.enumerate()) -+ nthreads = threading.active_count() - else: - nthreads = None - self.__logger.log(Log.INFO, "Waiting 30 seconds to let load modules settle down") -@@ -233,7 +233,7 @@ class RtEval(rtevalReport): - "Measurement threads did not use the full time slot. Doing a controlled stop.") - - if with_loads: -- if len(threading.enumerate()) < nthreads: -+ if threading.active_count() < nthreads: - raise RuntimeError("load thread died!") - - if not load_avg_checked: -diff --git a/rteval/modules/loads/__init__.py b/rteval/modules/loads/__init__.py -index 9a942f454536..2c2105efa964 100644 ---- a/rteval/modules/loads/__init__.py -+++ b/rteval/modules/loads/__init__.py -@@ -106,7 +106,7 @@ class LoadModules(RtEvalModules): - "Loads and imports all the configured modules" - - for m in modcfg: -- # hope to eventually have different kinds but module is only on -+ # hope to eventually have different kinds but module is only one - # for now (jcw) - if m[1].lower() == 'module': - self._LoadModule(m[0]) -diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py -index 2fb90c1946a5..21a803b8a3cd 100644 ---- a/rteval/modules/loads/hackbench.py -+++ b/rteval/modules/loads/hackbench.py -@@ -42,6 +42,9 @@ class Hackbench(CommandLineLoad): - CommandLineLoad.__init__(self, "hackbench", config, logger) - - def _WorkloadSetup(self): -+ if self._donotrun: -+ return -+ - 'calculate arguments based on input parameters' - (mem, units) = self.memsize - if units == 'KB': -diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py -index 8d08a3d44302..ec85b75f38b5 100644 ---- a/rteval/modules/loads/kcompile.py -+++ b/rteval/modules/loads/kcompile.py -@@ -158,6 +158,9 @@ class Kcompile(CommandLineLoad): - "error removing builddir (%s) (ret=%d)" % (self.builddir, ret)) - - def _WorkloadSetup(self): -+ if self._donotrun: -+ return -+ - # find our source tarball - if 'tarball' in self._cfg: - tarfile = os.path.join(self.srcdir, self._cfg.tarfile) -@@ -219,6 +222,9 @@ class Kcompile(CommandLineLoad): - - - def _WorkloadBuild(self): -+ if self._donotrun: -+ return -+ - null = os.open("/dev/null", os.O_RDWR) - if self._logging: - out = self.open_logfile("kcompile-build.stdout") -@@ -293,6 +299,9 @@ class Kcompile(CommandLineLoad): - - - def _WorkloadCleanup(self): -+ if self._donotrun: -+ return -+ - self._log(Log.DEBUG, "out of stopevent loop") - for n in self.buildjobs: - if self.buildjobs[n].jobid.poll() is None: --- -2.31.1 - diff --git a/rteval-Remove-mult-from-hackbench.py.patch b/rteval-Remove-mult-from-hackbench.py.patch deleted file mode 100644 index abf65c8..0000000 --- a/rteval-Remove-mult-from-hackbench.py.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 50e885286b535c4014e769791c25d172e7ee1a8d Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Tue, 14 Sep 2021 14:48:01 -0400 -Subject: [PATCH 02/11] rteval: Remove mult from hackbench.py - -The method for calculating the number of jobs to run for hackbench was -changed with the following commit. -commit 67629a1b69ffe72af6bfb3a0d4362ac1920005a7 - -However, the mult variable which was used to calculate the number of -jobs using the older method was not removed. - -Remove it now and simplify the logic. - -Signed-off-by: John Kacur ---- - rteval/modules/loads/hackbench.py | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py -index ab028c495d8b..8119d50f626a 100644 ---- a/rteval/modules/loads/hackbench.py -+++ b/rteval/modules/loads/hackbench.py -@@ -41,7 +41,6 @@ class Hackbench(CommandLineLoad): - def __init__(self, config, logger): - CommandLineLoad.__init__(self, "hackbench", config, logger) - -- - def _WorkloadSetup(self): - 'calculate arguments based on input parameters' - (mem, units) = self.memsize -@@ -51,12 +50,10 @@ class Hackbench(CommandLineLoad): - mem = mem / 1024.0 - elif units == 'TB': - mem = mem * 1024 -+ - ratio = float(mem) / float(self.num_cpus) -- if ratio >= 0.75: -- mult = float(self._cfg.setdefault('jobspercore', 2)) -- else: -+ if ratio < 0.75: - self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio) -- mult = 0 - - sysTop = SysTopology() - # get the number of nodes --- -2.31.1 - diff --git a/rteval-Remove-self.__err_sleep.patch b/rteval-Remove-self.__err_sleep.patch deleted file mode 100644 index f92063c..0000000 --- a/rteval-Remove-self.__err_sleep.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0d226e7032399e94f8bdeac84c55333209f0a558 Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Tue, 14 Sep 2021 14:56:42 -0400 -Subject: [PATCH 03/11] rteval: Remove self.__err_sleep - -commit 5ed68ae77ec05786aab99fbed35d0347a5d25997 -changed the code to exit gracefully if hackbench failed from memory -errors. No attempt is made anymore to wait to see if memory pressures -ease. The variable __err_sleep however was not removed at the time. -Remove it now, as it is now longer used. - -Signed-off-by: John Kacur ---- - rteval/modules/loads/hackbench.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py -index 8119d50f626a..2fb90c1946a5 100644 ---- a/rteval/modules/loads/hackbench.py -+++ b/rteval/modules/loads/hackbench.py -@@ -97,7 +97,6 @@ class Hackbench(CommandLineLoad): - '-l', str(self._cfg.setdefault('loops', '1000')), - '-s', str(self._cfg.setdefault('datasize', '1000')) - ] -- self.__err_sleep = 5.0 - - def _WorkloadBuild(self): - # Nothing to build, so we're basically ready --- -2.31.1 - diff --git a/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch b/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch deleted file mode 100644 index e55a6f1..0000000 --- a/rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch +++ /dev/null @@ -1,35 +0,0 @@ -From be811d28a471cfcaf7960289e00960e7f5b18f03 Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Thu, 15 Jul 2021 10:09:03 -0400 -Subject: [PATCH] rteval: Restrict measurement threads to the cpus in cpumask - -Only run measurement threads on cpus in the list from sched_getaffinity - -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index 232bd6b9acc6..ae91dbb7c043 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -209,6 +209,15 @@ class Cyclictest(rtevalModulePrototype): - else: - self.__cpus = online_cpus() - -+ # Get the cpuset from the environment -+ cpuset = os.sched_getaffinity(0) -+ -+ # Convert the elements to strings -+ cpuset = [str(c) for c in cpuset] -+ -+ # Only include cpus that are in the cpuset -+ self.__cpus = [c for c in self.__cpus if c in cpuset] -+ - self.__numcores = len(self.__cpus) - - info = cpuinfo() --- -2.31.1 - diff --git a/rteval-Update-to-using-the-linux-5.13.2-kernel.patch b/rteval-Update-to-using-the-linux-5.13.2-kernel.patch deleted file mode 100644 index 57af4d6..0000000 --- a/rteval-Update-to-using-the-linux-5.13.2-kernel.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 936bdd7aff0e46a1509ee4844cba279053ca97c7 Mon Sep 17 00:00:00 2001 -From: John Kacur -Date: Fri, 16 Jul 2021 11:33:19 -0400 -Subject: [PATCH] rteval: Update to using the linux-5.13.2 kernel - -Update to using the linux-5.13.2 kernel - -Signed-off-by: John Kacur ---- - Makefile | 2 +- - rteval/modules/loads/kcompile.py | 4 ++-- - rteval/rteval.conf | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index d942858d5a62..36d40867883c 100644 ---- a/Makefile -+++ b/Makefile -@@ -17,7 +17,7 @@ PREFIX := /usr - DATADIR := $(DESTDIR)/$(PREFIX)/share - LOADDIR := loadsource - --KLOAD := $(LOADDIR)/linux-5.7.tar.xz -+KLOAD := $(LOADDIR)/linux-5.13.2.tar.xz - BLOAD := $(LOADDIR)/dbench-4.0.tar.gz - LOADS := $(KLOAD) $(BLOAD) - -diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py -index e747b9f17782..d1955c7aee3d 100644 ---- a/rteval/modules/loads/kcompile.py -+++ b/rteval/modules/loads/kcompile.py -@@ -35,7 +35,7 @@ from rteval.Log import Log - from rteval.misc import expand_cpulist, compress_cpulist - from rteval.systopology import SysTopology - --kernel_prefix = "linux-5.7" -+kernel_prefix = "linux-5.13" - - class KBuildJob: - '''Class to manage a build job bound to a particular node''' -@@ -302,7 +302,7 @@ class Kcompile(CommandLineLoad): - - def ModuleParameters(): - return {"source": {"descr": "Source tar ball", -- "default": "linux-5.7.tar.xz", -+ "default": "linux-5.13.2.tar.xz", - "metavar": "TARBALL"}, - "jobspercore": {"descr": "Number of working threads per core", - "default": 2, -diff --git a/rteval/rteval.conf b/rteval/rteval.conf -index 6065d2e909f6..7ce6ef0b5acc 100644 ---- a/rteval/rteval.conf -+++ b/rteval/rteval.conf -@@ -18,7 +18,7 @@ dbench: external - stressng: module - - [kcompile] --source: linux-5.7.xz -+source: linux-5.13.2.xz - jobspercore: 2 - - [hackbench] --- -2.31.1 - diff --git a/rteval-cyclictest.py-Do-not-pass-obsolete-notrace-op.patch b/rteval-cyclictest.py-Do-not-pass-obsolete-notrace-op.patch deleted file mode 100644 index e71df09..0000000 --- a/rteval-cyclictest.py-Do-not-pass-obsolete-notrace-op.patch +++ /dev/null @@ -1,28 +0,0 @@ -From b22d7905d1588a0e96c70e000837ecee4872415f Mon Sep 17 00:00:00 2001 -From: Atsushi Nemoto -Date: Wed, 28 Jul 2021 20:20:15 +0900 -Subject: [PATCH] rteval: cyclictest.py: Do not pass obsolete --notrace option - -The notrace option was removed from cyclictest on rt-tests v1.4 in 2019. - -Signed-off-by: Atsushi Nemoto -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index ae91dbb7c043..b1755d4f4421 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -286,7 +286,6 @@ class Cyclictest(rtevalModulePrototype): - if 'breaktrace' in self.__cfg and self.__cfg.breaktrace: - self.__cmd.append("-b%d" % int(self.__cfg.breaktrace)) - self.__cmd.append("--tracemark") -- self.__cmd.append("--notrace") - - # Buffer for cyclictest data written to stdout - self.__cyclicoutput = tempfile.SpooledTemporaryFile(mode='w+b') --- -2.31.1 - diff --git a/rteval-cyclictest.py-Parse-max-latencies-from-cyclic.patch b/rteval-cyclictest.py-Parse-max-latencies-from-cyclic.patch deleted file mode 100644 index eab8175..0000000 --- a/rteval-cyclictest.py-Parse-max-latencies-from-cyclic.patch +++ /dev/null @@ -1,90 +0,0 @@ -From e528354ac4b9a82b12ee283808d3254944cfbf9e Mon Sep 17 00:00:00 2001 -From: Punit Agrawal -Date: Mon, 18 Oct 2021 14:57:34 +0900 -Subject: [PATCH 1/6] rteval: cyclictest.py Parse max latencies from cyclictest - output - -When collecting a histogram of latencies, "cyclictest" reports the -maximum latency encountered on each core even if they fall outside the -configured no. of buckets. This can be useful to understand the worst -case latencies for the run as well as right sizing the number of -buckets for the histogram. - -While processing the output of cyclictest, rteval skips the reported -max latencies and calculates them by capping to the no. of buckets. - -Fix rteval by parsing the maximum latencies reported by cyclictest. - -Signed-off-by: Punit Agrawal -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 31 +++++++++++++++++++----- - 1 file changed, 25 insertions(+), 6 deletions(-) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index b1755d4f4421..f79949faf031 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -67,20 +67,25 @@ class RunData: - retval += "mean: %f\n" % self.__mean - return retval - -- def sample(self, value): -- self.__samples[value] += self.__samples.setdefault(value, 0) + 1 -+ def update_max(self, value): - if value > self.__max: - self.__max = value -+ -+ def update_min(self, value): - if value < self.__min: - self.__min = value -+ -+ def sample(self, value): -+ self.__samples[value] += self.__samples.setdefault(value, 0) + 1 -+ self.update_max(value) -+ self.update_min(value) - self.__numsamples += 1 - - def bucket(self, index, value): - self.__samples[index] = self.__samples.setdefault(index, 0) + value -- if value and index > self.__max: -- self.__max = index -- if value and index < self.__min: -- self.__min = index -+ if value: -+ self.update_max(index) -+ self.update_min(index) - self.__numsamples += value - - def reduce(self): -@@ -325,6 +330,18 @@ class Cyclictest(rtevalModulePrototype): - return False - - -+ def _parse_max_latencies(self, line): -+ if not line.startswith('# Max Latencies: '): -+ return -+ -+ line = line.split(':')[1] -+ vals = [int(x) for x in line.split()] -+ -+ for i, core in enumerate(self.__cpus): -+ self.__cyclicdata[core].update_max(vals[i]) -+ self.__cyclicdata['system'].update_max(vals[i]) -+ -+ - def _WorkloadCleanup(self): - if not self.__started: - return -@@ -341,6 +358,8 @@ class Cyclictest(rtevalModulePrototype): - # Catch if cyclictest stopped due to a breaktrace - if line.startswith('# Break value: '): - self.__breaktraceval = int(line.split(':')[1]) -+ elif line.startswith('# Max Latencies: '): -+ self._parse_max_latencies(line) - continue - - # Skipping blank lines --- -2.31.1 - diff --git a/rteval-cyclictest.py-Skip-statistics-reporting-in-ca.patch b/rteval-cyclictest.py-Skip-statistics-reporting-in-ca.patch deleted file mode 100644 index 66e27f6..0000000 --- a/rteval-cyclictest.py-Skip-statistics-reporting-in-ca.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 0292c8963611f3376b88335b372cfc32b96db8cc Mon Sep 17 00:00:00 2001 -From: Punit Agrawal -Date: Mon, 18 Oct 2021 14:57:36 +0900 -Subject: [PATCH 3/6] rteval: cyclictest.py: Skip statistics reporting in case - of an overflow - -The cyclictest.py module recently gained the capability to parse max -latency values as reported by cyclictest. - -When the max latency exceeds the range of the latency histogram (or in -other words, the number of configured buckets), statistics such as -mean and standard deviation can not be calculated correctly due to -lost samples during measurement. - -In the case of lost samples, skip statistics generation and report the -max latency warning to the user to rerun the measurement. - -Signed-off-by: Punit Agrawal -- Small edit to the explanation -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index e459c1839865..c094df499403 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -67,6 +67,9 @@ class RunData: - retval += "mean: %f\n" % self.__mean - return retval - -+ def get_max(self): -+ return self.__max -+ - def update_max(self, value): - if value > self.__max: - self.__max = value -@@ -416,6 +419,13 @@ class Cyclictest(rtevalModulePrototype): - if abrt: - rep_n.addChild(abrt_n) - -+ # Let the user know if max latency overshot the number of buckets -+ if self.__cyclicdata["system"].get_max() > self.__buckets: -+ self._log(Log.ERR, "Max latency(%dus) exceeded histogram range(%dus). Skipping statistics" % -+ (self.__cyclicdata["system"].get_max(), self.__buckets)) -+ self._log(Log.ERR, "Increase number of buckets to avoid lost samples") -+ return rep_n -+ - rep_n.addChild(self.__cyclicdata["system"].MakeReport()) - for thr in self.__cpus: - if str(thr) not in self.__cyclicdata: --- -2.31.1 - diff --git a/rteval-cyclictest.py-Sort-the-list-of-cpus.patch b/rteval-cyclictest.py-Sort-the-list-of-cpus.patch deleted file mode 100644 index 00a01fb..0000000 --- a/rteval-cyclictest.py-Sort-the-list-of-cpus.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8240a34f22c09151501ec1fa2ae76cdad057f9e5 Mon Sep 17 00:00:00 2001 -From: Punit Agrawal -Date: Mon, 18 Oct 2021 14:57:35 +0900 -Subject: [PATCH 2/6] rteval: cyclictest.py: Sort the list of cpus - -online_cpus() returns a list of online cpus in arbitrary order. e.g., -on a hexacore system it returns - - - ['5', '3', '1', '4', '2', '0'] - -Generally this wouldn't be a problem but the cyclictest.py module -matches the unsorted list with the latencies output by "cyclictest" -which are ordered by core number. This leads to incorrect reporting of -per-core latencies in the final report generated by rteval. The issue -was noticed when comparing the rteval report with cyclictest logs -(enabled by a recent change). - -Fix the inconsistency in core numbering by sorting the list of cpus -used by cyclictest.py module. As the cpus are represented as a string, -sort with the integer key to avoid issues on systems with large number -of cores. - -Signed-off-by: Punit Agrawal -Signed-off-by: John Kacur ---- - rteval/modules/measurement/cyclictest.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py -index f79949faf031..e459c1839865 100644 ---- a/rteval/modules/measurement/cyclictest.py -+++ b/rteval/modules/measurement/cyclictest.py -@@ -214,6 +214,10 @@ class Cyclictest(rtevalModulePrototype): - else: - self.__cpus = online_cpus() - -+ # Sort the list of cpus to align with the order reported by -+ # cyclictest -+ self.__cpus.sort(key=int) -+ - # Get the cpuset from the environment - cpuset = os.sched_getaffinity(0) - --- -2.31.1 - diff --git a/rteval-hackbench.py-Enable-running-on-a-system-with-low-mem.patch b/rteval-hackbench.py-Enable-running-on-a-system-with-low-mem.patch deleted file mode 100644 index 42cd393..0000000 --- a/rteval-hackbench.py-Enable-running-on-a-system-with-low-mem.patch +++ /dev/null @@ -1,42 +0,0 @@ -From cb8263770e4f5834a43db6be8ffb55ffd7f876c9 Mon Sep 17 00:00:00 2001 -From: Punit Agrawal -Date: Wed, 1 Sep 2021 17:08:15 +0900 -Subject: [PATCH 01/11] rteval: hackbench.py: Enable running on a system with - low memory - -The hackbench workload refues to run on RockPro64, a hexacore 64bit -Arm board with 4GB memory, complaining about insufficient memory -per-core. - -On further investigation, it turns out that workload is using an -arbitrary limit of 0.75 GB/core but will quite happily run on much -lower lower memory systems. - -Instead of preventing execution, convert the info message to a warning -when the memory is lower than expected but continue execution. This -should enable the workload to be used on a wider range of systems. - -Signed-off-by: Punit Agrawal -Signed-off-by: John Kacur ---- - rteval/modules/loads/hackbench.py | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py -index 3b692070e9d9..ab028c495d8b 100644 ---- a/rteval/modules/loads/hackbench.py -+++ b/rteval/modules/loads/hackbench.py -@@ -55,9 +55,8 @@ class Hackbench(CommandLineLoad): - if ratio >= 0.75: - mult = float(self._cfg.setdefault('jobspercore', 2)) - else: -- self._log(Log.INFO, "Low memory system (%f GB/core)! Not running" % ratio) -+ self._log(Log.WARN, "Low memory system (%f GB/core)!" % ratio) - mult = 0 -- self._donotrun = True - - sysTop = SysTopology() - # get the number of nodes --- -2.31.1 - diff --git a/rteval.spec b/rteval.spec index 6a67f15..2a5233e 100644 --- a/rteval.spec +++ b/rteval.spec @@ -1,6 +1,6 @@ Name: rteval -Version: 3.2 -Release: 10%{?dist} +Version: 3.3 +Release: 1%{?dist} Summary: Utility to evaluate system suitability for RT Linux Group: Development/Tools @@ -29,19 +29,8 @@ Requires: libmpc, libmpc-devel BuildArch: noarch #Patches -Patch1: rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch -Patch2: rteval-Update-to-using-the-linux-5.13.2-kernel.patch -Patch3: rteval-hackbench.py-Enable-running-on-a-system-with-low-mem.patch -Patch4: rteval-Remove-mult-from-hackbench.py.patch -Patch5: rteval-Remove-self.__err_sleep.patch -Patch6: rteval-Make-donotrun-work-correctly-in-load-modules.patch -Patch7: rteval-Add-idea-of-exclusive-load-module-and-make-st.patch -Patch8: rteval-cyclictest.py-Do-not-pass-obsolete-notrace-op.patch -Patch9: rteval-cyclictest.py-Parse-max-latencies-from-cyclic.patch -Patch10: rteval-cyclictest.py-Sort-the-list-of-cpus.patch -Patch11: rteval-cyclictest.py-Skip-statistics-reporting-in-ca.patch -Patch12: rteval-Add-cyclictest-threshold-USEC.patch -Patch13: rteval-Fix-test-misses-threshold-assignment.patch +Patch1: rteval-Fix-test-misses-threshold-assignment.patch +Patch2: rteval-Increase-default-buckets-from-2000-to-3500.patch %description The rteval script is a utility for measuring various aspects of @@ -56,17 +45,6 @@ to the screen. %setup -q %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 %build %{__python3} setup.py build @@ -93,7 +71,13 @@ rm -rf $RPM_BUILD_ROOT %{python3_sitelib}/rteval/__pycache__/* %changelog -* Fri Jan 14 2022 john Kacur - 3.2-10 +* Wed Jan 26 2022 John Kacur - 3.3-1 +- Rebase to upstream rteval-3.3 +- Fix case where the threshold assignment is not properly parsed +- Increase the default number of buckets from 2000 to 3500 +Resolves: rhbz#2012294 + +* Fri Jan 14 2022 John Kacur - 3.2-10 - Fix test missing threshold assignment Resolves: rhbz#1995195 diff --git a/sources b/sources index 1978a88..83cad74 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rteval-3.2.tar.xz) = 0ec6d543b2293d993f5d589bb90d16d7570d0b070273a7c647956c06488a5dbf424e9674103c0f3bf5c558377a66f460b567575412109fd28ed1e301e2751ed7 +SHA512 (rteval-3.3.tar.xz) = 8539dc467063a1851ee805ec27d5da591a2fea4443baa2e9aa76066f12793b0129ace61d139674084f962e9fbbf6b08fe7dccb8c5b48a9bfb5b9cfc96a08119c