Skip to contentSkip to conversation

rteval: Default to higher cyclictest bucket count on non-RT kernels

PATCH New Tomas Glozar 1 participant 3 messages Aug 16, 2023

lore
Share & tools
lore
#0 lore raw

cover rteval: Default to higher cyclictest bucket count on non-RT kernels

When running rteval on non-RT systems, the default number of cyclictest buckets is not enough to get useful statistics out of it.

To make testing of rteval easier on such systems, this patchset proposes to set the default value of --cyclictest-buckets to 50000 when a non-RT kernel is detected.

This is a value that should, at least when tested on my machine, not overflow in a typical run on a non-RT kernel.

Tomas Glozar (2):
rteval: Support custom argument default value help
rteval: Set higher cyclictest bucket count on non-RT kernels

 rteval/modules/__init__.py               | 3 ++-
 rteval/modules/measurement/cyclictest.py | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/2 rteval: Support custom argument default value help

Add an optional default_value option to sets returned from ModuleParameters to specify a different default value help text than the value of default field.

This is useful for cases where the default value depends on the environment

---
 rteval/modules/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
rteval/modules/__init__.py +2 -1
index e7025ce..469d0f0 100644
@@ -307,12 +307,13 @@ the information provided by the module"""
                 if default is None:
                     default = 'default' in s and s['default'] or None
 
+                default_text = s['default_text'] if 'default_text' in s else default
 
                 grparser.add_argument('--%s-%s' % (shortmod, o),
                                     dest="%s___%s" % (shortmod, o),
                                     action='store',
                                     help='%s%s' % (descr,
-                                                   default and ' (default: %s)' % default or ''),
+                                                   default and ' (default: %s)' % default_text or ''),
                                     default=default,
                                     metavar=metavar)
 
Signature · 1 line
2.41.0
#2 lore raw

PATCH 2/2 rteval: Set higher cyclictest bucket count on non-RT kernels

In reply to Tomas Glozar

Make the default for --cyclictest-buckets 50000 instead of 3500 on non-RT kernels to make overflowing much less likely.

---
 rteval/modules/measurement/cyclictest.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
rteval/modules/measurement/cyclictest.py +2 -1
index 50b2e2a..addd8da 100644
@@ -434,7 +434,8 @@ def ModuleParameters():
                          "default": 100,
                          "metavar": "INTV_US"},
             "buckets":  {"descr": "Histogram width",
-                         "default": 3500,
+                         "default": 3500 if "RT " in os.uname().version else 50000,
+                         "default_text": "3500 when running on a RT kernel, 50000 otherwise",
                          "metavar": "NUM"},
             "priority": {"descr": "Run cyclictest with the given priority",
                          "default": 95,
Signature · 1 line
2.41.0