From: Tomas Glozar <tglozar@redhat.com>
To: linux-rt-users@vger.kernel.org
Cc: Tomas Glozar <tglozar@redhat.com>
Subject: [PATCH 5/6] rteval: Fix CPU count calculation for hackbench
Date: Fri, 30 Jun 2023 11:19:06 +0200 [thread overview]
Message-ID: <20230630091951.916865-6-tglozar@redhat.com> (raw)
In-Reply-To: <20230630091951.916865-1-tglozar@redhat.com>
Use count from cpulist when specified and all CPUs on node excluding
offline ones and isolated ones if not specified.
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
---
rteval/modules/loads/hackbench.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/rteval/modules/loads/hackbench.py b/rteval/modules/loads/hackbench.py
index 14e60d1..f5a547e 100644
--- a/rteval/modules/loads/hackbench.py
+++ b/rteval/modules/loads/hackbench.py
@@ -38,6 +38,7 @@ from rteval.Log import Log
from rteval.systopology import CpuList, SysTopology
expand_cpulist = CpuList.expand_cpulist
+isolated_cpulist = CpuList.isolated_cpulist
class Hackbench(CommandLineLoad):
def __init__(self, config, logger):
@@ -77,9 +78,12 @@ class Hackbench(CommandLineLoad):
# if a cpulist was specified, only allow cpus in that list on the node
if self.cpulist:
self.cpus[n] = [c for c in self.cpus[n] if c in expand_cpulist(self.cpulist)]
+ # if a cpulist was not specified, exclude isolated cpus
+ else:
+ self.cpus[n] = CpuList.nonisolated_cpulist(self.cpus[n])
# track largest number of cpus used on a node
- node_biggest = len(sysTop.getcpus(int(n)))
+ node_biggest = len(self.cpus[n])
if node_biggest > biggest:
biggest = node_biggest
--
2.41.0
next prev parent reply other threads:[~2023-06-30 9:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 9:19 [PATCH 0/6] rteval: Handle isolcpus correctly Tomas Glozar
2023-06-30 9:19 ` [PATCH 1/6] rteval: Detect isolcpus in systopology Tomas Glozar
2023-07-25 13:33 ` John Kacur
2023-07-25 13:36 ` John Kacur
2023-06-30 9:19 ` [PATCH 2/6] rteval: Report isolated CPUs Tomas Glozar
2023-07-25 13:38 ` John Kacur
2023-06-30 9:19 ` [PATCH 3/6] rteval: Exclude isolcpus from kcompile by default Tomas Glozar
2023-07-25 13:40 ` John Kacur
2023-06-30 9:19 ` [PATCH 4/6] rteval: Exclude isolcpus from stressng " Tomas Glozar
2023-07-25 13:42 ` John Kacur
2023-06-30 9:19 ` Tomas Glozar [this message]
2023-07-25 13:44 ` [PATCH 5/6] rteval: Fix CPU count calculation for hackbench John Kacur
2023-06-30 9:19 ` [PATCH 6/6] rteval: Exclude isolcpus from loads report Tomas Glozar
2023-07-25 14:32 ` 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=20230630091951.916865-6-tglozar@redhat.com \
--to=tglozar@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 NNTP newsgroup(s).