From: tglozar@redhat.com
To: linux-rt-users@vger.kernel.org
Cc: jkacur@redhat.com, Tomas Glozar <tglozar@redhat.com>
Subject: [PATCH] rteval: Add relative cpulists for loads
Date: Wed, 6 Mar 2024 10:07:22 +0100 [thread overview]
Message-ID: <20240306090722.147221-1-tglozar@redhat.com> (raw)
From: Tomas Glozar <tglozar@redhat.com>
Relative cpulists were added for measurements in 64ce7848 ("rteval: Add
relative cpulists for measurements").
Add support for relative cpulists also for loads. This works the same
way as for measurements using parse_cpulist_from_config, only difference
is there is no --loads-run-on-isolcpus option.
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
rteval-cmd | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/rteval-cmd b/rteval-cmd
index a5e8746..8572022 100755
--- a/rteval-cmd
+++ b/rteval-cmd
@@ -340,28 +340,29 @@ if __name__ == '__main__':
ldcfg = config.GetSection('loads')
msrcfg = config.GetSection('measurement')
msrcfg_cpulist_present = msrcfg.cpulist != ""
- # Parse measurement cpulist using parse_cpulist_from_config to account for run-on-isolcpus
+ ldcfg_cpulist_present = ldcfg.cpulist != ""
+ # Parse cpulists using parse_cpulist_from_config to account for run-on-isolcpus
# and relative cpusets
cpulist = parse_cpulist_from_config(msrcfg.cpulist, msrcfg.run_on_isolcpus)
if msrcfg_cpulist_present and not cpulist_utils.is_relative(msrcfg.cpulist) and msrcfg.run_on_isolcpus:
logger.log(Log.WARN, "ignoring --measurement-run-on-isolcpus, since cpulist is specified")
msrcfg.cpulist = collapse_cpulist(cpulist)
- if ldcfg.cpulist:
- ldcfg.cpulist = remove_offline(ldcfg.cpulist)
+ cpulist = parse_cpulist_from_config(ldcfg.cpulist, run_on_isolcpus=False)
+ ldcfg.cpulist = collapse_cpulist(cpulist)
# if we only specified one set of cpus (loads or measurement)
# default the other to the inverse of the specified list
- if not ldcfg.cpulist and msrcfg_cpulist_present:
+ if not ldcfg_cpulist_present and msrcfg_cpulist_present:
tmplist = expand_cpulist(msrcfg.cpulist)
tmplist = SysTopology().invert_cpulist(tmplist)
tmplist = cpulist_utils.online_cpulist(tmplist)
ldcfg.cpulist = collapse_cpulist(tmplist)
- if not msrcfg_cpulist_present and ldcfg.cpulist:
+ if not msrcfg_cpulist_present and ldcfg_cpulist_present:
tmplist = expand_cpulist(ldcfg.cpulist)
tmplist = SysTopology().invert_cpulist(tmplist)
tmplist = cpulist_utils.online_cpulist(tmplist)
msrcfg.cpulist = collapse_cpulist(tmplist)
- if ldcfg.cpulist:
+ if ldcfg_cpulist_present:
logger.log(Log.DEBUG, f"loads cpulist: {ldcfg.cpulist}")
# if --onlyload is specified msrcfg.cpulist is unused
if msrcfg_cpulist_present and not rtevcfg.onlyload:
--
2.44.0
next reply other threads:[~2024-03-06 9:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 9:07 tglozar [this message]
2024-03-28 16:08 ` [PATCH] rteval: Add relative cpulists for loads 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=20240306090722.147221-1-tglozar@redhat.com \
--to=tglozar@redhat.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).