import tuna-0.16-3.el8
This commit is contained in:
parent
da05ce3803
commit
a09a352a75
|
@ -0,0 +1,49 @@
|
|||
From c9d2fc624905cd0af96ee9f84317d562a042fe14 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Wed, 6 Oct 2021 13:21:50 -0400
|
||||
Subject: [PATCH] tuna: Add distinction between --spread and --move to error
|
||||
message
|
||||
|
||||
Currently, the command `tuna --cpus=CPU-LIST --spread` generates an
|
||||
error with the warning "tuna: --move requires a list of threads/irqs!".
|
||||
Similarly, when the command `tuna --threads=THREAD-LIST --spread` is
|
||||
run, it generates the warning "tuna: --move requires a cpu list!".
|
||||
|
||||
This can be confusing to the user, especially with commands that use both
|
||||
the "--spread" and "--move" flags. The warning should specify "--spread"
|
||||
when that is the source of the error.
|
||||
|
||||
Check whether the argument is a move or spread and update the warning
|
||||
string accordingly.
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 8617966..8dfad9e 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -633,15 +633,14 @@ def main():
|
||||
elif o in ("-n", "--show_sockets"):
|
||||
show_sockets = True
|
||||
elif o in ("-m", "--move", "-x", "--spread"):
|
||||
+ spread = o in ("-x", "--spread")
|
||||
if not cpu_list:
|
||||
- print("tuna: --move " + _("requires a cpu list!"))
|
||||
+ print("tuna: %s " % ("--spread" if spread else "--move") + _("requires a cpu list!"))
|
||||
sys.exit(2)
|
||||
if not (thread_list or irq_list):
|
||||
- print("tuna: --move " + _("requires a list of threads/irqs!"))
|
||||
+ print("tuna: %s " % ("--spread" if spread else "--move") + _("requires a list of threads/irqs!"))
|
||||
sys.exit(2)
|
||||
|
||||
- spread = o in ("-x", "--spread")
|
||||
-
|
||||
if thread_list:
|
||||
tuna.move_threads_to_cpu(cpu_list, thread_list, spread=spread)
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
From 1dd72d9db74b063c8dd96f13701a14e299abc325 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Thu, 28 Oct 2021 00:50:12 -0400
|
||||
Subject: [PATCH 1/2] tuna: Print warning if setting affinity results in EBUSY
|
||||
and continue
|
||||
|
||||
When trying to isolate a CPU, if a device uses SCHED_DEADLINE and admission
|
||||
control is enabled, setting the affinity will result in the error EBUSY.
|
||||
|
||||
tuna should print a warning that this pid could not be moved, and
|
||||
continue.
|
||||
|
||||
The user can either ignore the warning or use other measures to isolate
|
||||
the cpu such as booting with isolcpus or turning off admission control
|
||||
and rerunning the tuna isolate command and then turning admission
|
||||
control back on.
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/tuna.py | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index 591206d9b4e1..f25eb3d10923 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -360,6 +360,10 @@ def isolate_cpus(cpus, nr_cpus):
|
||||
if err.args[0] == errno.EINVAL:
|
||||
print("Function:", fname, ",", err.strerror, file=sys.stderr)
|
||||
sys.exit(2)
|
||||
+ if err.args[0] == errno.EBUSY:
|
||||
+ comm = ps[pid].stat["comm"]
|
||||
+ print(f'Warning: Unable to isolate pid {pid} [{comm}]')
|
||||
+ continue
|
||||
raise err
|
||||
|
||||
if "threads" not in ps[pid]:
|
||||
--
|
||||
2.31.1
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: tuna
|
||||
Version: 0.16
|
||||
Release: 1%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: GPLv2
|
||||
Summary: Application tuning GUI & command line utility
|
||||
Group: Applications/System
|
||||
|
@ -16,6 +16,8 @@ Requires: python3-linux-procfs >= 0.6
|
|||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
# PATCHES
|
||||
Patch1: tuna-Add-distinction-between-spread-and-move-to-erro.patch
|
||||
Patch2: tuna-Print-warning-if-setting-affinity-results-in-EBUSY.patch
|
||||
|
||||
%description
|
||||
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
||||
|
@ -28,6 +30,8 @@ installed.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
|
@ -74,6 +78,14 @@ rm -rf %{buildroot}
|
|||
%{_datadir}/polkit-1/actions/org.tuna.policy
|
||||
|
||||
%changelog
|
||||
* Thu Oct 28 2021 John Kacur <jkacur@redhat.com> - 0.16-3
|
||||
- Print warning if setaffinity causes EBUSY and continue
|
||||
Resolves: rhbz#2018285
|
||||
|
||||
* Tue Oct 26 2021 Leah Leshchinsky <lleshchi@redhat.com> - 0.16-2
|
||||
- Add distinction between --spread and --move to error message
|
||||
Resolves: rhbz#2012241
|
||||
|
||||
* Wed Jun 30 2021 John Kacur <jkacur@redhat.com> - 0.16-1
|
||||
- Upgrade to latest upstream
|
||||
Resolves: rhbz#1947069
|
||||
|
|
Loading…
Reference in New Issue