diff --git a/tuna-Fix-matching-irqs-in-ps_show_thread.patch b/tuna-Fix-matching-irqs-in-ps_show_thread.patch new file mode 100644 index 0000000..3d7cf16 --- /dev/null +++ b/tuna-Fix-matching-irqs-in-ps_show_thread.patch @@ -0,0 +1,52 @@ +From 3f1fbb092f5ef07d04fef7ddec9e538f36d84450 Mon Sep 17 00:00:00 2001 +From: John Kacur +Date: Fri, 2 Sep 2022 11:55:07 -0400 +Subject: [PATCH] tuna: Fix matching irqs in ps_show_thread + +The new format to match irqs is "irqs/" +We already test this when we call is_irq_thread(cmd): + +With this fix if you do + +tuna show_threads + +You will get nic information that was previously missed such as + + 986 FIFO 50 9 69286 2 irq/164-iwlwifi:default_que +ue iwlwifi:default_queue + +Signed-off-by: John Kacur +--- + tuna-cmd.py | 15 +++++---------- + 1 file changed, 5 insertions(+), 10 deletions(-) + +diff --git a/tuna-cmd.py b/tuna-cmd.py +index b13b25b8a801..80e27523acc6 100755 +--- a/tuna-cmd.py ++++ b/tuna-cmd.py +@@ -351,17 +351,12 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes, + try: + if not irqs: + irqs = procfs.interrupts() +- if cmd[:4] == "IRQ-": +- users = irqs[tuna.irq_thread_number(cmd)]["users"] +- for u in users: +- if u in get_nics(): +- users[users.index(u)] = "%s(%s)" % ( +- u, ethtool.get_module(u)) +- users = ",".join(users) +- else: +- u = cmd[cmd.find('-') + 1:] ++ users = irqs[tuna.irq_thread_number(cmd)]["users"] ++ for u in users: + if u in get_nics(): +- users = ethtool.get_module(u) ++ users[users.index(u)] = "%s(%s)" % ( ++ u, ethtool.get_module(u)) ++ users = ",".join(users) + except: + users = "Not found in /proc/interrupts!" + +-- +2.37.3 + diff --git a/tuna.spec b/tuna.spec index 9d5cf8a..c8abae0 100644 --- a/tuna.spec +++ b/tuna.spec @@ -1,6 +1,6 @@ Name: tuna Version: 0.18 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 Summary: Application tuning GUI & command line utility URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git @@ -14,6 +14,7 @@ Requires: python3-linux-procfs >= 0.6 # Patches Patch1: tuna-Replace-python_ethtool-with-builtin-funtionalit.patch +Patch2: tuna-Fix-matching-irqs-in-ps_show_thread.patch %description Provides interface for changing scheduler and IRQ tunables, at whole CPU and at @@ -27,6 +28,7 @@ installed. %prep %setup -q %patch1 -p1 +%patch2 -p1 %build %py3_build @@ -68,6 +70,10 @@ done %{_datadir}/polkit-1/actions/org.tuna.policy %changelog +* Mon Oct 03 2022 John Kacur - 0.18-5 +- Match irqs with "irqs/" +Resolves: rhbz#2131343 + * Fri Sep 30 2022 John Kacur - 0.18-4 - Remove the "Requires" of python-ethtool from the specfile Resolves: rhbz#2123751