linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>,
	Tomas Glozar <tglozar@redhat.com>, John Kacur <jkacur@redhat.com>,
	Claude <noreply@anthropic.com>
Subject: [PATCH 10/12] rteval: timerlat: Add dma_latency option with default value of 0
Date: Fri,  7 Nov 2025 13:26:33 -0500	[thread overview]
Message-ID: <20251107182645.19545-11-jkacur@redhat.com> (raw)
In-Reply-To: <20251107182645.19545-1-jkacur@redhat.com>

Add support for the rtla timerlat --dma-latency option to control
/dev/cpu_dma_latency settings. The option is enabled by default with
a value of 0 to help reduce latency by preventing deep CPU idle states.

Users can customize the value or disable the option entirely by setting
dma_latency to None in the configuration.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/modules/measurement/timerlat.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/rteval/modules/measurement/timerlat.py b/rteval/modules/measurement/timerlat.py
index 95fb7f136c25..1c7fb1607682 100644
--- a/rteval/modules/measurement/timerlat.py
+++ b/rteval/modules/measurement/timerlat.py
@@ -232,6 +232,12 @@ class Timerlat(rtevalModulePrototype):
         self.__cmd.append(f'-E{self.__buckets}')
         self.__cmd.append('--no-summary')
 
+        # Add dma-latency option if configured (default is 0)
+        # If dma_latency is explicitly set to None, don't pass the option to rtla
+        dma_latency = self.__cfg.setdefault('dma_latency', '0')
+        if dma_latency is not None and str(dma_latency).lower() != 'none':
+            self.__cmd.append(f'--dma-latency={dma_latency}')
+
         if self.__cfg.stoptrace:
             self.__cmd.append(f"-T{int(self.__cfg.stoptrace)}")
 
@@ -523,6 +529,9 @@ def ModuleParameters():
             "trace":    {"descr": "File to save trace to",
                          "default": None,
                          "metavar": "FILE" },
+            "dma_latency": {"descr": "Set /dev/cpu_dma_latency to USEC (set to None to disable)",
+                            "default": "0",
+                            "metavar": "USEC" },
            }
 
 def create(params, logger):
-- 
2.51.1


  parent reply	other threads:[~2025-11-07 18:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 18:26 [PATCH 00/12] rteval updates John Kacur
2025-11-07 18:26 ` [PATCH 01/12] rteval: Fix spelling of 'occurrences' in measurement modules John Kacur
2025-11-07 18:26 ` [PATCH 02/12] rteval: Fix typo in comment John Kacur
2025-11-07 18:26 ` [PATCH 03/12] rteval: Remove unused function remove_offline John Kacur
2025-11-07 18:26 ` [PATCH 04/12] rteval: timerlat: Fix typo in log message John Kacur
2025-11-07 18:26 ` [PATCH 05/12] rteval: cyclictest: Fix typo in comment John Kacur
2025-11-07 18:26 ` [PATCH 06/12] rteval: rtevalConfig: Remove redundant 'is True' comparison John Kacur
2025-11-07 18:26 ` [PATCH 07/12] rteval: Clean up MANIFEST.in and fix newnet.py copyright header John Kacur
2025-11-07 18:26 ` [PATCH 08/12] rteval: Add pyproject.toml for modern Python packaging John Kacur
2025-11-07 18:26 ` [PATCH 09/12] rteval: Improve argparse implementation and remove manual sys.argv parsing John Kacur
2025-11-07 18:26 ` John Kacur [this message]
2025-11-07 18:26 ` [PATCH 11/12] rteval: Add --measurement-module command-line argument John Kacur
2025-11-07 18:26 ` [PATCH 12/12] rteval: Add unit tests for --measurement-module argument John Kacur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251107182645.19545-11-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=noreply@anthropic.com \
    --cc=tglozar@redhat.com \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).