From: Punit Agrawal <punitagrawal@gmail.com>
To: jkacur@redhat.com
Cc: Punit Agrawal <punitagrawal@gmail.com>,
linux-rt-users@vger.kernel.org,
Punit Agrawal <punit1.agrawal@toshiba.co.jp>
Subject: [PATCH v3 3/4] rteval: cyclictest.py: Sort the list of cpus
Date: Mon, 18 Oct 2021 14:57:35 +0900 [thread overview]
Message-ID: <20211018055736.412576-4-punitagrawal@gmail.com> (raw)
In-Reply-To: <20211018055736.412576-1-punitagrawal@gmail.com>
From: Punit Agrawal <punit1.agrawal@toshiba.co.jp>
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 <punit1.agrawal@toshiba.co.jp>
---
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 d3a0b045b9dd..50a734c75047 100644
--- a/rteval/modules/measurement/cyclictest.py
+++ b/rteval/modules/measurement/cyclictest.py
@@ -216,6 +216,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.33.0
next prev parent reply other threads:[~2021-10-18 5:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 5:57 [PATCH v3 0/4] rteval: Fix issues with cyclictest module Punit Agrawal
2021-10-18 5:57 ` [PATCH v3 1/4] rteval: cyclictest.py Enable logging cyclictest output Punit Agrawal
2021-11-09 7:02 ` Punit Agrawal
2021-10-18 5:57 ` [PATCH v3 2/4] rteval: cyclictest.py Parse max latencies from " Punit Agrawal
2021-10-27 23:28 ` John Kacur
2021-10-18 5:57 ` Punit Agrawal [this message]
2021-10-27 23:28 ` [PATCH v3 3/4] rteval: cyclictest.py: Sort the list of cpus John Kacur
2021-10-18 5:57 ` [PATCH v3 4/4] rteval: cyclictest.py: Skip statistics reporting in case of an overflow Punit Agrawal
2021-10-27 23:29 ` John Kacur
2021-11-01 7:40 ` Punit Agrawal
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=20211018055736.412576-4-punitagrawal@gmail.com \
--to=punitagrawal@gmail.com \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=punit1.agrawal@toshiba.co.jp \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.