Restrict measurement threads to cpus in the cpumask
Resolves: rhbz#1982707 Signed-off-by: John Kacur <jkacur@redhat.com>
This commit is contained in:
parent
12e951c254
commit
490f6f3565
@ -0,0 +1,35 @@
|
|||||||
|
From be811d28a471cfcaf7960289e00960e7f5b18f03 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Kacur <jkacur@redhat.com>
|
||||||
|
Date: Thu, 15 Jul 2021 10:09:03 -0400
|
||||||
|
Subject: [PATCH] rteval: Restrict measurement threads to the cpus in cpumask
|
||||||
|
|
||||||
|
Only run measurement threads on cpus in the list from sched_getaffinity
|
||||||
|
|
||||||
|
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||||
|
---
|
||||||
|
rteval/modules/measurement/cyclictest.py | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
|
||||||
|
index 232bd6b9acc6..ae91dbb7c043 100644
|
||||||
|
--- a/rteval/modules/measurement/cyclictest.py
|
||||||
|
+++ b/rteval/modules/measurement/cyclictest.py
|
||||||
|
@@ -209,6 +209,15 @@ class Cyclictest(rtevalModulePrototype):
|
||||||
|
else:
|
||||||
|
self.__cpus = online_cpus()
|
||||||
|
|
||||||
|
+ # Get the cpuset from the environment
|
||||||
|
+ cpuset = os.sched_getaffinity(0)
|
||||||
|
+
|
||||||
|
+ # Convert the elements to strings
|
||||||
|
+ cpuset = [str(c) for c in cpuset]
|
||||||
|
+
|
||||||
|
+ # Only include cpus that are in the cpuset
|
||||||
|
+ self.__cpus = [c for c in self.__cpus if c in cpuset]
|
||||||
|
+
|
||||||
|
self.__numcores = len(self.__cpus)
|
||||||
|
|
||||||
|
info = cpuinfo()
|
||||||
|
--
|
||||||
|
2.31.1
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: rteval
|
Name: rteval
|
||||||
Version: 3.2
|
Version: 3.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Utility to evaluate system suitability for RT Linux
|
Summary: Utility to evaluate system suitability for RT Linux
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -31,6 +31,7 @@ Requires: openssl-devel
|
|||||||
Obsoletes: rteval-common <= 3.1
|
Obsoletes: rteval-common <= 3.1
|
||||||
|
|
||||||
#Patches
|
#Patches
|
||||||
|
Patch1: rteval-Restrict-measurement-threads-to-the-cpus-in-cpumask.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The rteval script is a utility for measuring various aspects of
|
The rteval script is a utility for measuring various aspects of
|
||||||
@ -43,6 +44,7 @@ to the screen.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python3} setup.py build
|
%{__python3} setup.py build
|
||||||
@ -80,6 +82,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{python3_sitelib}/rteval/__pycache__/*
|
%{python3_sitelib}/rteval/__pycache__/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 15 2021 John Kacur <jkacur@redhat.com> - 3.2-2
|
||||||
|
- Restrict measurement threads to cpus in the cpumask
|
||||||
|
Resolves: rhbz#1982707
|
||||||
|
|
||||||
* Fri Jul 09 2021 John Kacur <jkacur@redhat.com> - 3.2-1
|
* Fri Jul 09 2021 John Kacur <jkacur@redhat.com> - 3.2-1
|
||||||
- Rebase to latest upstream rteval-3.2
|
- Rebase to latest upstream rteval-3.2
|
||||||
- Remove patches that are included in the rebase
|
- Remove patches that are included in the rebase
|
||||||
|
Loading…
Reference in New Issue
Block a user