Rebase to tuna-0.15
This commit is contained in:
parent
3f5904021b
commit
351b9c8bed
|
@ -4,3 +4,4 @@
|
|||
/tuna-0.13.1.tar.xz
|
||||
/tuna-0.14.tar.xz
|
||||
/tuna-0.14.1.tar.xz
|
||||
/tuna-0.15.tar.xz
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (tuna-0.14.1.tar.xz) = fda7bc0da96ed2b7900f8fe42db67a7e74f83ff29b8ecf02dc3ad7131df76e6a47e3b8e66a76449be4f11020400360324d1eb4e996e9745542e2c5ee1075de69
|
||||
SHA512 (tuna-0.15.tar.xz) = de4e705fc126f087697dc31956ad80ee55a3ef932dcd0abfcacd31ff3fb4742061293f2de4e4e608b18d5840d320420dc64f746c6aa88adad38af1fb3bd968be
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
From cd9e707b23980ed568aeddac6eaa2125b651c6cc Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Wed, 3 Mar 2021 10:45:28 -0500
|
||||
Subject: [PATCH] tuna: Fix tuna --include option breakage
|
||||
|
||||
The change to remove the dependency on python-schedutils
|
||||
broke the --include function.
|
||||
|
||||
get_affinity(pid) from python-schedutils returned a list
|
||||
os.sched_getaffinity(pid) returns a set
|
||||
|
||||
In many cases they can be interchanged, but not with the '+' operation
|
||||
Fix this by changing affinity to a list before concatenation
|
||||
|
||||
Reported-by: Mark Simmons <msimmons@redhat.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/tuna.py | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index e5122dac1081..614a8250b054 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -431,9 +431,9 @@ def include_cpus(cpus, nr_cpus):
|
||||
if err.args[0] == errno.ESRCH:
|
||||
continue
|
||||
raise err
|
||||
- if set(affinity).intersection(set(cpus)) != set(cpus):
|
||||
+ if affinity.intersection(set(cpus)) != set(cpus):
|
||||
previous_pid_affinities[pid] = copy.copy(affinity)
|
||||
- affinity = list(set(affinity + cpus))
|
||||
+ affinity = list(affinity) + cpus
|
||||
try:
|
||||
os.sched_setaffinity(pid, affinity)
|
||||
except OSError as err:
|
||||
@@ -453,9 +453,9 @@ def include_cpus(cpus, nr_cpus):
|
||||
if err.args[0] == errno.ESRCH:
|
||||
continue
|
||||
raise err
|
||||
- if set(affinity).intersection(set(cpus)) != set(cpus):
|
||||
+ if affinity.intersection(set(cpus)) != set(cpus):
|
||||
previous_pid_affinities[tid] = copy.copy(affinity)
|
||||
- affinity = list(set(affinity + cpus))
|
||||
+ affinity = list(affinity) + cpus
|
||||
try:
|
||||
os.sched_setaffinity(tid, affinity)
|
||||
except OSError as err:
|
||||
--
|
||||
2.26.3
|
||||
|
15
tuna.spec
15
tuna.spec
|
@ -1,10 +1,9 @@
|
|||
Name: tuna
|
||||
Version: 0.14.1
|
||||
Release: 5%{?dist}
|
||||
Version: 0.15
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2
|
||||
Summary: Application tuning GUI & command line utility
|
||||
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
|
||||
Patch0: oscilloscope-move-from-pygtk2-to-gtk3-gobject.patch
|
||||
URL: https://rt.wiki.kernel.org/index.php/Tuna
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel, gettext
|
||||
|
@ -14,6 +13,9 @@ Requires: python3-schedutils >= 0.6
|
|||
# This really should be a Suggests...
|
||||
# Requires: python-inet_diag
|
||||
|
||||
# Patches
|
||||
Patch1: tuna-Fix-tuna-include-option-breakage.patch
|
||||
|
||||
%description
|
||||
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
||||
per thread/IRQ level. Allows isolating CPUs for use by a specific application
|
||||
|
@ -41,7 +43,7 @@ priority is changed, be it using tuna or plain chrt & taskset.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%py3_build
|
||||
|
@ -90,6 +92,11 @@ done
|
|||
%doc docs/oscilloscope+tuna.pdf
|
||||
|
||||
%changelog
|
||||
* Mon May 17 2021 John Kacur <jkacur@redhat.com> - 0.15-1
|
||||
- Rebase to tuna-0.15
|
||||
- This includes changes to remove the python-schedutils dependency
|
||||
Resolves: rhbz#1890541
|
||||
|
||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.14.1-5
|
||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||
|
||||
|
|
Loading…
Reference in New Issue