Compare commits
No commits in common. "c8" and "c9-beta" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/tuna-0.18.tar.xz
|
||||
SOURCES/tuna-0.19.tar.xz
|
||||
|
||||
1
.tuna.metadata
Normal file
1
.tuna.metadata
Normal file
@ -0,0 +1 @@
|
||||
4b8a04d219536ff295ef8ed188c6efcd0f74ee38 SOURCES/tuna-0.19.tar.xz
|
||||
41
SOURCES/0001-tuna-Fix-help.py-syntax-warnings.patch
Normal file
41
SOURCES/0001-tuna-Fix-help.py-syntax-warnings.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 5636a942a4e46c0d34647807903c47049d621707 Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Wed, 4 Dec 2024 15:31:58 -0500
|
||||
Subject: [PATCH] tuna: Fix help.py syntax warnings
|
||||
|
||||
Fix two syntax warnings with what looks like should have been a new line
|
||||
like the other help entries.
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com>
|
||||
- edited commit message
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/help.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tuna/help.py b/tuna/help.py
|
||||
index fa47ae8..c913a16 100644
|
||||
--- a/tuna/help.py
|
||||
+++ b/tuna/help.py
|
||||
@@ -44,7 +44,7 @@ PROC_SYS_HELP = {
|
||||
'net.core.rmem_default':N_('The default setting of the socket receive buffer in bytes.'),
|
||||
'net.core.rmem_max':N_('The maximum receive socket buffer size in bytes.'),
|
||||
'net.core.rps_sock_flow_entries':N_('This controls the maximum number of sockets/flows that the kernel can steer towards any specified CPU. This is a system-wide, shared limit.'),
|
||||
- 'net.core.somaxconn':N_('Limit of socket listen() backlog, known in userspace as SOMAXCONN. See also tcp_max_syn_backlog for additional tuning for TCP sockets.\Default: 128.'),
|
||||
+ 'net.core.somaxconn':N_('Limit of socket listen() backlog, known in userspace as SOMAXCONN. See also tcp_max_syn_backlog for additional tuning for TCP sockets.\nDefault: 128.'),
|
||||
'net.core.warnings':N_('This controls console messages from the networking stack that can occur because of problems on the network like duplicate address or bad checksums. Normally, this should be enabled, but if the problem persists the messages can be disabled.'),
|
||||
'net.core.wmem_default':N_('The default setting (in bytes) of the socket send buffer.'),
|
||||
'net.core.wmem_max':N_('The maximum send socket buffer size in bytes.'),
|
||||
@@ -118,7 +118,7 @@ PROC_SYS_HELP = {
|
||||
'net.ipv4.tcp_reordering':N_('Maximal reordering of packets in a TCP stream.\nDefault: 3'),
|
||||
'net.ipv4.tcp_retrans_collapse':N_('Bug-to-bug compatibility with some broken printers. On retransmit try to send bigger packets to work around bugs in certain TCP stacks.'),
|
||||
'net.ipv4.tcp_retries1':N_('This value influences the time, after which TCP decides, that something is wrong due to unacknowledged RTO retransmissions, and reports this suspicion to the network layer.\nRFC 1122 recommends at least 3 retransmissions, which is the default.\nDefault: 3'),
|
||||
- 'net.ipv4.tcp_retries2':N_('This value influences the timeout of an alive TCP connection, when RTO retransmissions remain unacknowledged. Given a value of N, a hypothetical TCP connection following exponential backoff with an initial RTO of TCP_RTO_MIN would retransmit N times before killing the connection at the (N+1)th RTO. The default value of 15 yields a hypothetical timeout of 924.6 seconds and is a lower bound for the effective timeout. TCP will effectively time out at the first RTO which exceeds the hypothetical timeout. RFC 1122 recommends at least 100 seconds for the timeout, which corresponds to a value of at least 8.\Default: 8'),
|
||||
+ 'net.ipv4.tcp_retries2':N_('This value influences the timeout of an alive TCP connection, when RTO retransmissions remain unacknowledged. Given a value of N, a hypothetical TCP connection following exponential backoff with an initial RTO of TCP_RTO_MIN would retransmit N times before killing the connection at the (N+1)th RTO. The default value of 15 yields a hypothetical timeout of 924.6 seconds and is a lower bound for the effective timeout. TCP will effectively time out at the first RTO which exceeds the hypothetical timeout. RFC 1122 recommends at least 100 seconds for the timeout, which corresponds to a value of at least 8.\nDefault: 8'),
|
||||
'net.ipv4.tcp_rfc1337':N_('If set, the TCP stack behaves conforming to RFC1337. If unset, we are not conforming to RFC, but prevent TCP TIME_WAIT assassination.\nDefault: 0'),
|
||||
'net.ipv4.tcp_rmem':N_('Vector of 3 values: min, default, max\n - min: Minimal size of receive buffer used by TCP sockets. It is guaranteed to each TCP socket, even under moderate memory pressure.\nDefault: 8K\n - default: initial size of receive buffer used by TCP sockets. This value overrides net.core.rmem_default used by other protocols. Default: 87380 bytes. This value results in window of 65535 with default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit less for default tcp_app_win. See below about these variables. - max: maximal size of receive buffer allowed for automatically selected receiver buffers for TCP socket. This value does not override net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables automatic tuning of that socket\'s receive buffer size, in which case this value is ignored.\nDefault: between 87380B and 4MB, depending on RAM size.'),
|
||||
'net.ipv4.tcp_sack':N_('Enable select acknowledgments (SACKS).'),
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,162 @@
|
||||
From e6c4991d6d628b5ab0e1767f3f44beba55e31c55 Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Wed, 9 Apr 2025 15:31:32 -0400
|
||||
Subject: [PATCH 1/3] tuna: extract common cpu and nics determination code into
|
||||
a utils.py file
|
||||
|
||||
Extracting the code allows these previously local (global to the file)
|
||||
variables and functions to be used in other files of tuna. Reducing
|
||||
the number of globals makes the code cleaner and reduces the size of
|
||||
tuna-cmd.py.
|
||||
|
||||
Included a suggestion by Crystal to move a function from the latter
|
||||
patch into utils.py and make it dependent on get_nr_cpus() (v2).
|
||||
|
||||
Included a request by John Kacur to place the SPDX message at the top of
|
||||
the file (v4).
|
||||
|
||||
Suggested-by: Crystal Wood <crwood@redhat.com>
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com>
|
||||
- minor spelling error fix
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 34 +++++++---------------------------
|
||||
tuna/utils.py | 28 ++++++++++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 27 deletions(-)
|
||||
create mode 100644 tuna/utils.py
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index f37e286..d0323f5 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -21,7 +21,7 @@ from functools import reduce
|
||||
import tuna.new_eth as ethtool
|
||||
import tuna.tuna_sched as tuna_sched
|
||||
import procfs
|
||||
-from tuna import tuna, sysfs
|
||||
+from tuna import tuna, sysfs, utils
|
||||
import logging
|
||||
import time
|
||||
import shutil
|
||||
@@ -76,7 +76,6 @@ except:
|
||||
|
||||
# FIXME: ETOOMANYGLOBALS, we need a class!
|
||||
|
||||
-nr_cpus = None
|
||||
ps = None
|
||||
irqs = None
|
||||
|
||||
@@ -233,25 +232,6 @@ def gen_parser():
|
||||
return parser
|
||||
|
||||
|
||||
-def get_nr_cpus():
|
||||
- """ Get all cpus including disabled cpus """
|
||||
- global nr_cpus
|
||||
- if nr_cpus:
|
||||
- return nr_cpus
|
||||
- nr_cpus = os.sysconf('SC_NPROCESSORS_CONF')
|
||||
- return nr_cpus
|
||||
-
|
||||
-nics = None
|
||||
-
|
||||
-
|
||||
-def get_nics():
|
||||
- global nics
|
||||
- if nics:
|
||||
- return nics
|
||||
- nics = ethtool.get_active_devices()
|
||||
- return nics
|
||||
-
|
||||
-
|
||||
def thread_help(tid):
|
||||
global ps
|
||||
if not ps:
|
||||
@@ -277,7 +257,7 @@ def save(cpu_list, thread_list, filename):
|
||||
if (cpu_list and not set(kt.affinity).intersection(set(cpu_list))) or \
|
||||
(thread_list and kt.pid not in thread_list):
|
||||
del kthreads[name]
|
||||
- tuna.generate_rtgroups(filename, kthreads, get_nr_cpus())
|
||||
+ tuna.generate_rtgroups(filename, kthreads, utils.get_nr_cpus())
|
||||
|
||||
|
||||
def ps_show_header(has_ctxt_switch_info, cgroups=False):
|
||||
@@ -328,7 +308,7 @@ def format_affinity(affinity):
|
||||
if len(affinity) <= 4:
|
||||
return ",".join(str(a) for a in affinity)
|
||||
|
||||
- return ",".join(str(hex(a)) for a in procfs.hexbitmask(affinity, get_nr_cpus()))
|
||||
+ return ",".join(str(hex(a)) for a in procfs.hexbitmask(affinity, utils.get_nr_cpus()))
|
||||
|
||||
def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
|
||||
sock_inode_re, cgroups, columns=None, compact=True):
|
||||
@@ -351,7 +331,7 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
|
||||
irqs = procfs.interrupts()
|
||||
users = irqs[tuna.irq_thread_number(cmd)]["users"]
|
||||
for u in users:
|
||||
- if u in get_nics():
|
||||
+ if u in utils.get_nics():
|
||||
users[users.index(u)] = "%s(%s)" % (
|
||||
u, ethtool.get_module(u))
|
||||
users = ",".join(users)
|
||||
@@ -486,7 +466,7 @@ def do_ps(thread_list, cpu_list, irq_list, show_uthreads, show_kthreads,
|
||||
|
||||
|
||||
def find_drivers_by_users(users):
|
||||
- nics = get_nics()
|
||||
+ nics = utils.get_nics()
|
||||
drivers = []
|
||||
for u in users:
|
||||
try:
|
||||
@@ -689,10 +669,10 @@ def main():
|
||||
apply_config(args.profilename)
|
||||
|
||||
elif args.command in ['include', 'I']:
|
||||
- tuna.include_cpus(args.cpu_list, get_nr_cpus())
|
||||
+ tuna.include_cpus(args.cpu_list, utils.get_nr_cpus())
|
||||
|
||||
elif args.command in ['isolate', 'i']:
|
||||
- tuna.isolate_cpus(args.cpu_list, get_nr_cpus())
|
||||
+ tuna.isolate_cpus(args.cpu_list, utils.get_nr_cpus())
|
||||
|
||||
elif args.command in ['run', 'r']:
|
||||
|
||||
diff --git a/tuna/utils.py b/tuna/utils.py
|
||||
new file mode 100644
|
||||
index 0000000..f55432d
|
||||
--- /dev/null
|
||||
+++ b/tuna/utils.py
|
||||
@@ -0,0 +1,28 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
+# Copyright (C) 2024 John B. Wyatt IV
|
||||
+
|
||||
+import os
|
||||
+
|
||||
+import tuna.new_eth as ethtool
|
||||
+
|
||||
+# Collect a few globals and functions so they can be reused in other modules
|
||||
+nr_cpus = None
|
||||
+nics = None
|
||||
+
|
||||
+def get_nr_cpus():
|
||||
+ """ Get all cpus including disabled cpus """
|
||||
+ global nr_cpus
|
||||
+ if nr_cpus != None:
|
||||
+ return nr_cpus
|
||||
+ nr_cpus = os.sysconf('SC_NPROCESSORS_CONF')
|
||||
+ return nr_cpus
|
||||
+
|
||||
+def get_all_cpu_list():
|
||||
+ return list(range(get_nr_cpus()))
|
||||
+
|
||||
+def get_nics():
|
||||
+ global nics
|
||||
+ if nics != None:
|
||||
+ return nics
|
||||
+ nics = ethtool.get_active_devices()
|
||||
+ return nics
|
||||
--
|
||||
2.49.0
|
||||
|
||||
290
SOURCES/0002-tuna-Add-idle_state-control-functionality.patch
Normal file
290
SOURCES/0002-tuna-Add-idle_state-control-functionality.patch
Normal file
@ -0,0 +1,290 @@
|
||||
From 9885caebbdc699e96ac18b1a603ad4790fbbe22d Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Wed, 9 Apr 2025 15:31:33 -0400
|
||||
Subject: [PATCH 2/3] tuna: Add idle_state control functionality
|
||||
|
||||
Allows Tuna to control cpu idle-state functionality on the system,
|
||||
including querying, enabling, disabling of cpu idle-states to control
|
||||
power usage or to test functionality.
|
||||
|
||||
This requires cpupower, a utility in the Linux kernel repository and
|
||||
the cpupower Python bindings added in Linux 6.12 to control cpu
|
||||
idle-states.
|
||||
|
||||
This patch revision includes text snippet & Python suggestions by Crystal
|
||||
Wood (v2-4) and small Python suggestions & code snippets by John Kacur
|
||||
(v3-5).
|
||||
|
||||
Suggested-by: John Kacur <jkacur@redhat.com>
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 30 +++++++-
|
||||
tuna/cpupower.py | 177 +++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 204 insertions(+), 3 deletions(-)
|
||||
create mode 100755 tuna/cpupower.py
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index d0323f5..4997eaa 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -25,6 +25,7 @@ from tuna import tuna, sysfs, utils
|
||||
import logging
|
||||
import time
|
||||
import shutil
|
||||
+import tuna.cpupower as cpw
|
||||
|
||||
def get_loglevel(level):
|
||||
if level.isdigit() and int(level) in range(0,5):
|
||||
@@ -115,8 +116,12 @@ def gen_parser():
|
||||
"disable_perf": dict(action='store_true', help="Explicitly disable usage of perf in GUI for process view"),
|
||||
"refresh": dict(default=2500, metavar='MSEC', type=int, help="Refresh the GUI every MSEC milliseconds"),
|
||||
"priority": dict(default=(None, None), metavar="POLICY:RTPRIO", type=tuna.get_policy_and_rtprio, help="Set thread scheduler tunables: POLICY and RTPRIO"),
|
||||
- "background": dict(action='store_true', help="Run command as background task")
|
||||
- }
|
||||
+ "background": dict(action='store_true', help="Run command as background task"),
|
||||
+ "idle_info": dict(dest='idle_info', action='store_const', const=True, help='Print general idle information for the selected CPUs, including index values for IDLE-STATE.'),
|
||||
+ "idle_state_disabled_status": dict(dest='idle_state_disabled_status', metavar='IDLE-STATE', type=int, help='Print whether IDLE-STATE is enabled on the selected CPUs.'),
|
||||
+ "disable_idle_state": dict(dest='disable_idle_state', metavar='IDLE-STATE', type=int, help='Disable IDLE-STATE on the selected CPUs.'),
|
||||
+ "enable_idle_state": dict(dest='enable_idle_state', metavar='IDLE-STATE', type=int, help='Enable IDLE-STATE on the selected CPUs.')
|
||||
+ }
|
||||
|
||||
parser = HelpMessageParser(description="tuna - Application Tuning Program")
|
||||
|
||||
@@ -127,6 +132,9 @@ def gen_parser():
|
||||
|
||||
subparser = parser.add_subparsers(dest='command')
|
||||
|
||||
+ idle_set = subparser.add_parser('cpu_power',
|
||||
+ description='Manage CPU idle state disabling (requires libcpupower and it\'s Python bindings)',
|
||||
+ help='Set all idle states on a given CPU-LIST.')
|
||||
isolate = subparser.add_parser('isolate', description="Move all allowed threads and IRQs away from CPU-LIST",
|
||||
help="Move all allowed threads and IRQs away from CPU-LIST")
|
||||
include = subparser.add_parser('include', description="Allow all threads to run on CPU-LIST",
|
||||
@@ -146,7 +154,6 @@ def gen_parser():
|
||||
show_threads = subparser.add_parser('show_threads', description='Show thread list', help='Show thread list')
|
||||
show_irqs = subparser.add_parser('show_irqs', description='Show IRQ list', help='Show IRQ list')
|
||||
show_configs = subparser.add_parser('show_configs', description='List preloaded profiles', help='List preloaded profiles')
|
||||
-
|
||||
what_is = subparser.add_parser('what_is', description='Provides help about selected entities', help='Provides help about selected entities')
|
||||
gui = subparser.add_parser('gui', description="Start the GUI", help="Start the GUI")
|
||||
|
||||
@@ -218,6 +225,13 @@ def gen_parser():
|
||||
show_irqs_group.add_argument('-S', '--sockets', **MODS['sockets'])
|
||||
show_irqs.add_argument('-q', '--irqs', **MODS['irqs'])
|
||||
|
||||
+ idle_set_group = idle_set.add_mutually_exclusive_group(required=True)
|
||||
+ idle_set_group.add_argument('-i', '--idle-info', **MODS['idle_info'])
|
||||
+ idle_set_group.add_argument('-s', '--status', **MODS['idle_state_disabled_status'])
|
||||
+ idle_set_group.add_argument('-d', '--disable', **MODS['disable_idle_state'])
|
||||
+ idle_set_group.add_argument('-e', '--enable', **MODS['enable_idle_state'])
|
||||
+ idle_set.add_argument('-c', '--cpus', **MODS['cpus'])
|
||||
+
|
||||
what_is.add_argument('thread_list', **POS['thread_list'])
|
||||
|
||||
gui.add_argument('-d', '--disable_perf', **MODS['disable_perf'])
|
||||
@@ -647,6 +661,16 @@ def main():
|
||||
print("Valid log levels: NOTSET, DEBUG, INFO, WARNING, ERROR")
|
||||
print("Log levels may be specified numerically (0-4)\n")
|
||||
|
||||
+ if args.command == 'cpu_power':
|
||||
+ if not cpw.have_cpupower:
|
||||
+ print(f"Error: libcpupower bindings are not detected; please install libcpupower bindings from at least kernel {cpw.cpupower_required_kernel}.", file=sys.stderr)
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ my_cpupower = cpw.Cpupower(args.cpu_list)
|
||||
+ ret = my_cpupower.idle_set_handler(args)
|
||||
+ if ret > 0:
|
||||
+ sys.exit(ret)
|
||||
+
|
||||
if 'irq_list' in vars(args):
|
||||
ps = procfs.pidstats()
|
||||
if tuna.has_threaded_irqs(ps):
|
||||
diff --git a/tuna/cpupower.py b/tuna/cpupower.py
|
||||
new file mode 100755
|
||||
index 0000000..ec04b90
|
||||
--- /dev/null
|
||||
+++ b/tuna/cpupower.py
|
||||
@@ -0,0 +1,177 @@
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
+# Copyright (C) 2025 John B. Wyatt IV
|
||||
+
|
||||
+import sys
|
||||
+from typing import List
|
||||
+from tuna import utils
|
||||
+
|
||||
+cpupower_required_kernel = "6.12"
|
||||
+have_cpupower = None
|
||||
+
|
||||
+try:
|
||||
+ import raw_pylibcpupower as lcpw
|
||||
+ lcpw.cpufreq_get_available_frequencies(0)
|
||||
+ have_cpupower = True
|
||||
+except ImportError:
|
||||
+ lcpw = None
|
||||
+ have_cpupower = False
|
||||
+
|
||||
+if have_cpupower:
|
||||
+ class Cpupower:
|
||||
+ """The Cpupower class allows you to query and change the power states of the
|
||||
+ cpu.
|
||||
+
|
||||
+ You may query or change the cpus all at once or a list of the cpus provided to the constructor's cpulist argument.
|
||||
+
|
||||
+ The bindings must be detected on the $PYTHONPATH variable.
|
||||
+
|
||||
+ You must use have_cpupower variable to determine if the bindings were
|
||||
+ detected in your code."""
|
||||
+
|
||||
+ LCPW_ERROR_TWO_CASE = 1 # enum for common error messages
|
||||
+ LCPW_ERROR_THREE_CASE = 2
|
||||
+
|
||||
+ def __init__(self, cpu_list=None):
|
||||
+ if cpu_list and not cpu_list == []:
|
||||
+ self.__cpu_list = cpu_list
|
||||
+ else:
|
||||
+ self.__cpu_list = utils.get_all_cpu_list()
|
||||
+
|
||||
+ def handle_common_lcpw_errors(self, e, error_type, idle_name):
|
||||
+ match e:
|
||||
+ case 0:
|
||||
+ pass
|
||||
+ case -1:
|
||||
+ print(f"Idlestate {idle_name} not available", file=sys.stderr)
|
||||
+ case -2:
|
||||
+ print("Disabling is not supported by the kernel", file=sys.stderr)
|
||||
+ case -3:
|
||||
+ if error_type == Cpupower.LCPW_ERROR_THREE_CASE:
|
||||
+ print("No write access to disable/enable C-states: try using sudo", file=sys.stderr)
|
||||
+ else:
|
||||
+ print(f"Not documented: {e}", file=sys.stderr)
|
||||
+ case _:
|
||||
+ print(f"Not documented: {e}", file=sys.stderr)
|
||||
+
|
||||
+ def get_idle_states(self, cpu):
|
||||
+ """
|
||||
+ Get the c-states of a cpu.
|
||||
+
|
||||
+ You can capture the return values with:
|
||||
+ states_list, states_amt = get_idle_states()
|
||||
+
|
||||
+ Returns
|
||||
+ List[String]: list of cstates
|
||||
+ Int: amt of cstates
|
||||
+ """
|
||||
+ ret = []
|
||||
+ for cstate in range(lcpw.cpuidle_state_count(cpu)):
|
||||
+ ret.append(lcpw.cpuidle_state_name(cpu,cstate))
|
||||
+ return ret, lcpw.cpuidle_state_count(cpu)
|
||||
+
|
||||
+ def get_idle_info(self, cpu):
|
||||
+ idle_states, idle_states_amt = self.get_idle_states(cpu)
|
||||
+ idle_states_list = []
|
||||
+ for idle_state, idle_state_name in enumerate(idle_states):
|
||||
+ idle_states_list.append(
|
||||
+ {
|
||||
+ "CPU ID": cpu,
|
||||
+ "Idle State Name": idle_state_name,
|
||||
+ "Flags/Description": lcpw.cpuidle_state_desc(cpu, idle_state),
|
||||
+ "Latency": lcpw.cpuidle_state_latency(cpu, idle_state),
|
||||
+ "Usage": lcpw.cpuidle_state_usage(cpu, idle_state),
|
||||
+ "Duration": lcpw.cpuidle_state_time(cpu, idle_state)
|
||||
+ }
|
||||
+ )
|
||||
+ idle_info = {
|
||||
+ "CPUidle-driver": lcpw.cpuidle_get_driver(),
|
||||
+ "CPUidle-governor": lcpw.cpuidle_get_governor(),
|
||||
+ "idle-states-count": idle_states_amt,
|
||||
+ "available-idle-states": idle_states,
|
||||
+ "cpu-states": idle_states_list
|
||||
+ }
|
||||
+ return idle_info
|
||||
+
|
||||
+ def print_idle_info(self, cpu_list):
|
||||
+ for cpu in cpu_list:
|
||||
+ idle_info = self.get_idle_info(cpu)
|
||||
+ print(
|
||||
+f"""CPUidle driver: {idle_info["CPUidle-driver"]}
|
||||
+CPUidle governor: {idle_info["CPUidle-governor"]}
|
||||
+analyzing CPU {cpu}
|
||||
+
|
||||
+Number of idle states: {idle_info["idle-states-count"]}
|
||||
+Available idle states: {idle_info["available-idle-states"]}""")
|
||||
+ for state in idle_info["cpu-states"]:
|
||||
+ print(
|
||||
+f"""{state["Idle State Name"]}
|
||||
+Flags/Description: {state["Flags/Description"]}
|
||||
+Latency: {state["Latency"]}
|
||||
+Usage: {state["Usage"]}
|
||||
+Duration: {state["Duration"]}""")
|
||||
+
|
||||
+ def idle_set_handler(self, args) -> int:
|
||||
+ if args.idle_state_disabled_status is not None:
|
||||
+ cstate_index = args.idle_state_disabled_status
|
||||
+ cstate_list, cstate_amt = self.get_idle_states(self.__cpu_list[0]) # Assuming all cpus have the same idle state
|
||||
+ if cstate_index < 0 or cstate_index >= cstate_amt:
|
||||
+ print(f"Invalid idle state range. Total for this cpu is {cstate_amt}", file=sys.stderr)
|
||||
+ return 1
|
||||
+ cstate_name = cstate_list[cstate_index]
|
||||
+ ret = self.is_disabled_idle_state(cstate_index)
|
||||
+ for i,e in enumerate(ret):
|
||||
+ if e == 1:
|
||||
+ print(f"CPU: {self.__cpu_list[i]} Idle state \"{cstate_name}\" is disabled.")
|
||||
+ elif e == 0:
|
||||
+ print(f"CPU: {self.__cpu_list[i]} Idle state \"{cstate_name}\" is enabled.")
|
||||
+ else:
|
||||
+ self.handle_common_lcpw_errors(e, self.LCPW_ERROR_TWO_CASE, cstate_name)
|
||||
+ elif args.idle_info is not None:
|
||||
+ self.print_idle_info(self.__cpu_list)
|
||||
+ return 0
|
||||
+ elif args.disable_idle_state is not None:
|
||||
+ cstate_index = args.disable_idle_state
|
||||
+ cstate_list, cstate_amt = self.get_idle_states(self.__cpu_list[0]) # Assuming all cpus have the same idle state
|
||||
+ if cstate_index < 0 or cstate_index >= cstate_amt:
|
||||
+ print(f"Invalid idle state range. Total for this cpu is {cstate_amt}")
|
||||
+ return 1
|
||||
+ cstate_name = cstate_list[cstate_index]
|
||||
+ ret = self.disable_idle_state(cstate_index, 1)
|
||||
+ for e in ret:
|
||||
+ self.handle_common_lcpw_errors(e, self.LCPW_ERROR_THREE_CASE, cstate_name)
|
||||
+ elif args.enable_idle_state is not None:
|
||||
+ cstate_index = args.enable_idle_state
|
||||
+ cstate_list, cstate_amt = self.get_idle_states(self.__cpu_list[0]) # Assuming all cpus have the same idle state
|
||||
+ if cstate_index < 0 or cstate_index >= cstate_amt:
|
||||
+ print(f"Invalid idle state range. Total for this cpu is {cstate_amt}")
|
||||
+ return 1
|
||||
+ cstate_name = cstate_list[cstate_index]
|
||||
+ ret = self.disable_idle_state(cstate_index, 0)
|
||||
+ for e in ret:
|
||||
+ self.handle_common_lcpw_errors(e, self.LCPW_ERROR_THREE_CASE, cstate_name)
|
||||
+ return 0
|
||||
+
|
||||
+ def disable_idle_state(self, state, disabled) -> List[int]:
|
||||
+ """
|
||||
+ Disable or enable an idle state using the object's stored list of cpus.
|
||||
+
|
||||
+ Args:
|
||||
+ state (int): The cpu idle state index to disable or enable as an int starting from 0.
|
||||
+ disabled (int): set to 1 to disable or 0 to enable. Less than 0 is an error.
|
||||
+ """
|
||||
+ ret = []
|
||||
+ for cpu in self.__cpu_list:
|
||||
+ ret.append(lcpw.cpuidle_state_disable(cpu, state, disabled))
|
||||
+ return ret
|
||||
+
|
||||
+ def is_disabled_idle_state(self, state) -> List[int]:
|
||||
+ """
|
||||
+ Query the idle state.
|
||||
+
|
||||
+ Args:
|
||||
+ state: The cpu idle state. 1 is disabled, 0 is enabled. Less than 0 is an error.
|
||||
+ """
|
||||
+ ret = []
|
||||
+ for cpu in self.__cpu_list:
|
||||
+ ret.append(lcpw.cpuidle_is_state_disabled(cpu, state))
|
||||
+ return ret
|
||||
--
|
||||
2.49.0
|
||||
|
||||
28
SOURCES/0002-tuna-help.py.patch
Normal file
28
SOURCES/0002-tuna-help.py.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 03a7a035b53d297f38f2cd05cb3fed91e15cf05c Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Wed, 11 Dec 2024 15:19:38 -0500
|
||||
Subject: [PATCH] tuna: help.py
|
||||
|
||||
Fix bad indentation in help.py. (Change 8 spaces to 4)
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/help.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuna/help.py b/tuna/help.py
|
||||
index c913a16..db8b4c8 100644
|
||||
--- a/tuna/help.py
|
||||
+++ b/tuna/help.py
|
||||
@@ -4,7 +4,7 @@ _ = gettext.gettext
|
||||
|
||||
# gettext_noop
|
||||
def N_(s):
|
||||
- return s
|
||||
+ return s
|
||||
|
||||
KTHREAD_HELP = {
|
||||
'kthreadd':N_('Used to create kernel threads via kthread_create(). It is the parent of all the other kernel threads.'),
|
||||
--
|
||||
2.50.1
|
||||
|
||||
54
SOURCES/0003-tuna-utils-A-few-tweaks.patch
Normal file
54
SOURCES/0003-tuna-utils-A-few-tweaks.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 59475dfad6c040654307dd7ee3427437b72a13ed Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Wed, 9 Apr 2025 18:20:13 -0400
|
||||
Subject: [PATCH 3/3] tuna: utils: A few tweaks
|
||||
|
||||
- Change copyright to 2025
|
||||
- Use is not None instead of !=
|
||||
- Add a few document strings
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/utils.py | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tuna/utils.py b/tuna/utils.py
|
||||
index f55432d..75900bd 100644
|
||||
--- a/tuna/utils.py
|
||||
+++ b/tuna/utils.py
|
||||
@@ -1,8 +1,8 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
-# Copyright (C) 2024 John B. Wyatt IV
|
||||
+# Copyright (C) 2025 John B. Wyatt IV
|
||||
+""" Module to return cpus and nics """
|
||||
|
||||
import os
|
||||
-
|
||||
import tuna.new_eth as ethtool
|
||||
|
||||
# Collect a few globals and functions so they can be reused in other modules
|
||||
@@ -12,17 +12,19 @@ nics = None
|
||||
def get_nr_cpus():
|
||||
""" Get all cpus including disabled cpus """
|
||||
global nr_cpus
|
||||
- if nr_cpus != None:
|
||||
+ if nr_cpus is not None:
|
||||
return nr_cpus
|
||||
nr_cpus = os.sysconf('SC_NPROCESSORS_CONF')
|
||||
return nr_cpus
|
||||
|
||||
def get_all_cpu_list():
|
||||
+ """ Return a list of all cpus """
|
||||
return list(range(get_nr_cpus()))
|
||||
|
||||
def get_nics():
|
||||
+ """ Return a list of network devices """
|
||||
global nics
|
||||
- if nics != None:
|
||||
+ if nics is not None:
|
||||
return nics
|
||||
nics = ethtool.get_active_devices()
|
||||
return nics
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 8c9b74f89c616a7aebbbd159e71aeb3c49979472 Mon Sep 17 00:00:00 2001
|
||||
From fbde2418c84e57723ae1698acfe5932a11f4d611 Mon Sep 17 00:00:00 2001
|
||||
From: Clark Williams <clrkwllms@kernel.org>
|
||||
Date: Thu, 17 Aug 2023 08:12:38 -0500
|
||||
Subject: [PATCH 1/2] Add SPDX license identifiers
|
||||
@ -81,15 +81,15 @@ index 2ca87e9edc62..a65117637160 100755
|
||||
import getopt
|
||||
import sys
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f3e36529fefb..a00adb9721a8 100755
|
||||
index db0f00735524..f119e75abdeb 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
from distutils.sysconfig import get_python_lib
|
||||
from distutils.core import setup
|
||||
from os.path import isfile, join
|
||||
import os
|
||||
import sysconfig
|
||||
from os.path import isfile, relpath
|
||||
diff --git a/testuna b/testuna
|
||||
index 4bf91ebdb76f..cb98640c0167 100755
|
||||
--- a/testuna
|
||||
@ -130,7 +130,7 @@ index 4bf91ebdb76f..cb98640c0167 100755
|
||||
die_if_conf_changed 'Restoring kernel thread sched policy'
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index f5dafa739da2..38e7017336a5 100755
|
||||
index 6a980598526f..e953869c4f48 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -5,14 +5,7 @@
|
||||
@ -147,7 +147,7 @@ index f5dafa739da2..38e7017336a5 100755
|
||||
-# General Public License for more details.
|
||||
+# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
""" tuna - Application Tuning GUI """
|
||||
""" tuna - Application Tuning Program"""
|
||||
|
||||
diff --git a/tuna.desktop b/tuna.desktop
|
||||
index 603011f79467..87ca3a35ce63 100644
|
||||
@ -296,7 +296,7 @@ index 1c903e106a44..cd2377a8df26 100755
|
||||
classes for /sys/devices/system/cpu/
|
||||
so we can get topology information and do CPU hotplug operations
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index e64211b88fc3..464d7f73212e 100755
|
||||
index e527facb151c..bd678e2dc7ae 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -306,7 +306,7 @@ index e64211b88fc3..464d7f73212e 100755
|
||||
|
||||
import copy
|
||||
import errno
|
||||
@@ -649,12 +650,12 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
@@ -647,12 +648,12 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
f.write('''# Generated by tuna
|
||||
#
|
||||
# Use it with rtctl:
|
||||
@ -321,7 +321,7 @@ index e64211b88fc3..464d7f73212e 100755
|
||||
# scheduling policy.
|
||||
#
|
||||
# Format is: <groupname>:<sched>:<prio>:<regex>
|
||||
@@ -663,7 +664,7 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
@@ -661,7 +662,7 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
# sched must be one of: 'f' (fifo)
|
||||
# 'b' (batch)
|
||||
# 'r' (round-robin)
|
||||
|
||||
@ -1,175 +0,0 @@
|
||||
From 9dfaafe278f6cccf6911cddef413dc59e87722e7 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Wed, 16 Nov 2022 10:38:10 -0500
|
||||
Subject: [PATCH] tuna: Adapt show_threads cgroup output to terminal size
|
||||
|
||||
Passing the --cgroup flag for the --show_threads command currently displays
|
||||
long cgroup strings on the thread output and decreases readability.
|
||||
|
||||
Adapt the show_threads output to account for output string and terminal
|
||||
size, and format output accordingly to improve readability. Add
|
||||
--spaced flag to --show_threads to print cgroups spacing in
|
||||
between thread outputs.
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
|
||||
---
|
||||
target branch: getopt
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
|
||||
diff --git a/docs/tuna.8 b/docs/tuna.8
|
||||
index 3a06556..218ba14 100644
|
||||
--- a/docs/tuna.8
|
||||
+++ b/docs/tuna.8
|
||||
@@ -80,6 +80,9 @@ Disable display of selected CPUs in \fB--gui\fR. Requires \fB-c\R.
|
||||
\fB\-G\fR, \fB\-\-cgroup\fR
|
||||
Display the processes with the type of cgroups they are in. Requires \fB-P\R.
|
||||
.TP
|
||||
+\fB\-z\fR, \fB\-\-spaced\fR
|
||||
+Display spaced view for cgroups. Requires \fB-G\R.
|
||||
+.TP
|
||||
\fB\-K\fR, \fB\-\-no_kthreads\fR
|
||||
Operations will not affect kernel threads.
|
||||
.TP
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 75b63da..54dc567 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -99,6 +99,8 @@ def usage():
|
||||
print(fmt % ('-g, --gui', _('Start the GUI')))
|
||||
print(fmt % ('-G, --cgroup',
|
||||
_('Display the processes with the type of cgroups they are in')))
|
||||
+ print(fmt % ('-z, --spaced',
|
||||
+ "Display spaced view for cgroups"))
|
||||
print(fmt % ('-c, --cpus=' + _('CPU-LIST'), _('%(cpulist)s affected by commands') %
|
||||
{"cpulist": _('CPU-LIST')}))
|
||||
print(fmt % ('-C, --affect_children',
|
||||
@@ -249,7 +251,7 @@ def format_affinity(affinity):
|
||||
return ",".join(str(hex(a)) for a in procfs.hexbitmask(affinity, get_nr_cpus()))
|
||||
|
||||
def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
|
||||
- sock_inode_re, cgroups):
|
||||
+ sock_inode_re, cgroups, columns=None, compact=True):
|
||||
global irqs
|
||||
try:
|
||||
affinity = format_affinity(os.sched_getaffinity(pid))
|
||||
@@ -286,10 +288,20 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
|
||||
nonvoluntary_ctxt_switches)
|
||||
|
||||
# Indent affected children
|
||||
- print(" %-5d " % pid if affect_children else " %-5d" % pid, end=' ')
|
||||
- print("%6s %5d %8s%s %15s %s" % (sched, rtprio, affinity,
|
||||
- ctxt_switch_info, cmd, users), end=' ')
|
||||
- print(" %9s" % cgout if cgroups else "")
|
||||
+ s1 = " %-5d " % pid if affect_children else " %-5d" % pid
|
||||
+ print(s1, end=' ')
|
||||
+ s2 = "%6s %5d %8s%s %15s %s" % (sched, rtprio, affinity,
|
||||
+ ctxt_switch_info, cmd, users)
|
||||
+ print(s2, end=' ')
|
||||
+
|
||||
+ if cgroups:
|
||||
+ length = int(columns) - len(s1 + " ") - len(s2 + " ")
|
||||
+ if len(" %9s" % cgout) <= length:
|
||||
+ print("%s" % cgout)
|
||||
+ else:
|
||||
+ print("\n %s" % cgout + ("" if compact else "\n"))
|
||||
+ else:
|
||||
+ print()
|
||||
|
||||
if sock_inodes:
|
||||
ps_show_sockets(pid, ps, sock_inodes, sock_inode_re,
|
||||
@@ -298,12 +310,12 @@ def ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info, sock_inodes,
|
||||
for tid in list(ps[pid]["threads"].keys()):
|
||||
ps_show_thread(tid, False, ps[pid]["threads"],
|
||||
has_ctxt_switch_info,
|
||||
- sock_inodes, sock_inode_re, cgroups)
|
||||
+ sock_inodes, sock_inode_re, cgroups, columns, compact)
|
||||
|
||||
|
||||
def ps_show(ps, affect_children, thread_list, cpu_list,
|
||||
irq_list_numbers, show_uthreads, show_kthreads,
|
||||
- has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups):
|
||||
+ has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups, compact):
|
||||
|
||||
ps_list = []
|
||||
for pid in list(ps.keys()):
|
||||
@@ -340,9 +352,14 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
|
||||
|
||||
ps_list.sort()
|
||||
|
||||
+ # Width of terminal in columns
|
||||
+ columns = None
|
||||
+ if cgroups:
|
||||
+ _, columns = os.popen('stty size', 'r').read().split()
|
||||
+
|
||||
for pid in ps_list:
|
||||
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
|
||||
- sock_inodes, sock_inode_re, cgroups)
|
||||
+ sock_inodes, sock_inode_re, cgroups, columns, compact)
|
||||
|
||||
|
||||
def load_socktype(socktype, inodes):
|
||||
@@ -363,7 +380,7 @@ def load_sockets():
|
||||
|
||||
|
||||
def do_ps(thread_list, cpu_list, irq_list, show_uthreads, show_kthreads,
|
||||
- affect_children, show_sockets, cgroups):
|
||||
+ affect_children, show_sockets, cgroups, compact):
|
||||
ps = procfs.pidstats()
|
||||
if affect_children:
|
||||
ps.reload_threads()
|
||||
@@ -380,7 +397,7 @@ def do_ps(thread_list, cpu_list, irq_list, show_uthreads, show_kthreads,
|
||||
ps_show_header(has_ctxt_switch_info, cgroups)
|
||||
ps_show(ps, affect_children, thread_list,
|
||||
cpu_list, irq_list, show_uthreads, show_kthreads,
|
||||
- has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups)
|
||||
+ has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups, compact)
|
||||
except IOError:
|
||||
# 'tuna -P | head' for instance
|
||||
pass
|
||||
@@ -535,13 +552,13 @@ def main():
|
||||
|
||||
i18n_init()
|
||||
try:
|
||||
- short = "a:c:dDCfgGhiIKlmNp:PQq:r:R:s:S:t:UvWxL:"
|
||||
+ short = "a:c:dDCfgGzhiIKlmNp:PQq:r:R:s:S:t:UvWxL:"
|
||||
long = ["cpus=", "affect_children", "filter", "gui", "help",
|
||||
"isolate", "include", "no_kthreads", "move", "nohz_full",
|
||||
"show_sockets", "priority=", "show_threads",
|
||||
"show_irqs", "irqs=",
|
||||
"save=", "sockets=", "threads=", "no_uthreads",
|
||||
- "version", "what_is", "spread", "cgroup", "config_file_apply=",
|
||||
+ "version", "what_is", "spread", "cgroup", "spaced", "config_file_apply=",
|
||||
"config_file_list", "run=", "refresh=", "disable_perf", "logging=", "debug"]
|
||||
if have_inet_diag:
|
||||
short += "n"
|
||||
@@ -556,6 +573,7 @@ def main():
|
||||
kthreads = True
|
||||
uthreads = True
|
||||
cgroups = False
|
||||
+ compact = True
|
||||
cpu_list = None
|
||||
debug = False
|
||||
irq_list = None
|
||||
@@ -623,6 +641,8 @@ def main():
|
||||
affect_children = True
|
||||
elif o in ("-G", "--cgroup"):
|
||||
cgroups = True
|
||||
+ elif o in ("-z", "--spaced"):
|
||||
+ compact = False
|
||||
elif o in ("-t", "--threads"):
|
||||
# The -t - will reset thread list
|
||||
if a == '-':
|
||||
@@ -691,7 +711,7 @@ def main():
|
||||
if thread_list_str or irq_list_str:
|
||||
continue
|
||||
do_ps(thread_list, cpu_list, irq_list, uthreads,
|
||||
- kthreads, affect_children, show_sockets, cgroups)
|
||||
+ kthreads, affect_children, show_sockets, cgroups, compact)
|
||||
elif o in ("-Q", "--show_irqs"):
|
||||
# If the user specified IRQ names that weren't
|
||||
# resolved to IRQs, don't show all IRQs.
|
||||
--
|
||||
2.38.1
|
||||
|
||||
66
SOURCES/tuna-Add-U-and-K-to-the-move-command.patch
Normal file
66
SOURCES/tuna-Add-U-and-K-to-the-move-command.patch
Normal file
@ -0,0 +1,66 @@
|
||||
From 4e10e5b34593052e6ce4a166796b10c72f978efd Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Thu, 5 Jun 2025 14:00:27 -0400
|
||||
Subject: [PATCH 4/4] tuna: Add -U and -K to the move command
|
||||
|
||||
Add the following options to the move command (like in the show_threads
|
||||
command)
|
||||
-U, --no_uthreads Operations will not affect user threads
|
||||
-K, --no_kthreads Operations will not affect kernel threads
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 4 +++-
|
||||
tuna/tuna.py | 7 ++++++-
|
||||
2 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 9496c61f0c2b..d0a3e6b7dbf8 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -174,6 +174,8 @@ def gen_parser():
|
||||
move_group.add_argument('-N', '--nohz_full', **MODS['nohz_full'])
|
||||
move.add_argument('-t', '--threads', **MODS['threads'])
|
||||
move.add_argument('-q', '--irqs', **MODS['irqs'])
|
||||
+ move.add_argument('-U', '--no_uthreads', **MODS['no_uthreads'])
|
||||
+ move.add_argument('-K', '--no_kthreads', **MODS['no_kthreads'])
|
||||
|
||||
spread_group = spread.add_mutually_exclusive_group(required=True)
|
||||
spread_group.add_argument('-c', '--cpus', **MODS['cpus'])
|
||||
@@ -746,7 +748,7 @@ def main():
|
||||
parser.error(f"tuna: {args.command} requires a thread/irq list!\n")
|
||||
|
||||
if args.thread_list:
|
||||
- tuna.move_threads_to_cpu(args.cpu_list, args.thread_list, spread=spread)
|
||||
+ tuna.move_threads_to_cpu(args.cpu_list, args.thread_list, args.uthreads, args.kthreads, spread=spread)
|
||||
|
||||
if args.irq_list:
|
||||
tuna.move_irqs_to_cpu(args.cpu_list, args.irq_list, spread=spread)
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index 1380df0dadba..ef60c033362d 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -174,7 +174,7 @@ def is_hardirq_handler(self, pid):
|
||||
except:
|
||||
return False
|
||||
|
||||
-def move_threads_to_cpu(cpus, pid_list, set_affinity_warning=None, spread=False):
|
||||
+def move_threads_to_cpu(cpus, pid_list, show_uthreads, show_kthreads, set_affinity_warning=None, spread=False):
|
||||
changed = False
|
||||
|
||||
ps = procfs.pidstats()
|
||||
@@ -183,6 +183,11 @@ def move_threads_to_cpu(cpus, pid_list, set_affinity_warning=None, spread=False)
|
||||
new_affinity = cpus
|
||||
last_cpu = max(cpus) + 1
|
||||
for pid in pid_list:
|
||||
+ iskth = iskthread(pid)
|
||||
+ if not show_uthreads and not iskth:
|
||||
+ continue
|
||||
+ if not show_kthreads and iskth:
|
||||
+ continue
|
||||
if spread:
|
||||
new_affinity = [cpus[cpu_idx]]
|
||||
cpu_idx += 1
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
From f2763aaed8f421bcf266a3122a84c41a7441a5d9 Mon Sep 17 00:00:00 2001
|
||||
From 5c2ff1e15bbce8d76a038de55abc20e8b3164bb7 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Mon, 11 Dec 2023 16:29:02 -0500
|
||||
Date: Mon, 11 Dec 2023 16:35:03 -0500
|
||||
Subject: [PATCH] tuna: Don't start the gui if a display is not available
|
||||
|
||||
This is intended for the getopt branch of tuna
|
||||
This is intended for the main branch of tuna.
|
||||
|
||||
Don't start the gui if a display is not available.
|
||||
|
||||
@ -13,17 +13,17 @@ Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 38e7017336a5..ff2920f06d6f 100755
|
||||
index e953869c4f48..f37e286bffdb 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -821,6 +821,12 @@ def main():
|
||||
sys.exit(2)
|
||||
@@ -736,6 +736,12 @@ def main():
|
||||
thread_help(tid)
|
||||
|
||||
if run_gui:
|
||||
elif args.command in ['g', 'gui']:
|
||||
+ # Don't try to start the gui if no display is available
|
||||
+ display = os.getenv("DISPLAY")
|
||||
+ if not display:
|
||||
+ usage()
|
||||
+ parser.print_help()
|
||||
+ return
|
||||
+
|
||||
try:
|
||||
|
||||
@ -1,52 +0,0 @@
|
||||
From 3f1fbb092f5ef07d04fef7ddec9e538f36d84450 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
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 <jkacur@redhat.com>
|
||||
---
|
||||
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
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
From 12633d556c48d4491eae3c25962591a2c9cd6c94 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Thu, 5 Jun 2025 11:54:42 -0400
|
||||
Subject: [PATCH 3/4] tuna: Fix run command failing to apply BATCH policy
|
||||
|
||||
When using tuna run with -p BATCH the newly spawned process is created
|
||||
with SCHED_OTHER instead of SCHED_BATCH
|
||||
|
||||
Fix this by calling thread_set_priority if the policy is not zero
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna/tuna.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index d4c3e2c1a661..1380df0dadba 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -621,7 +621,7 @@ def run_command(cmd, policy, rtprio, cpu_list, background):
|
||||
if newpid == 0:
|
||||
cmd_list = shlex.split(cmd)
|
||||
pid = os.getpid()
|
||||
- if rtprio:
|
||||
+ if rtprio or policy:
|
||||
try:
|
||||
thread_set_priority(pid, policy, rtprio)
|
||||
except (SystemError, OSError) as err:
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
From 613bc73f6ad821db682e9efc097c29af9cb40858 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Wed, 23 Nov 2022 14:14:36 -0500
|
||||
Subject: [PATCH] tuna: Fix --show_threads --cgroup without a term
|
||||
|
||||
When tuna --show_threads --cgroups is run without a term,
|
||||
provide a default column size of 80 to fix a traceback
|
||||
that occurred when querying the terminal size.
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
- Edited the commit title
|
||||
- Edited the description
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 54dc567..f5dafa7 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -31,6 +31,7 @@ import procfs
|
||||
from tuna import tuna, sysfs
|
||||
import logging
|
||||
import time
|
||||
+import shutil
|
||||
|
||||
def get_loglevel(level):
|
||||
if level.isdigit() and int(level) in range(0,5):
|
||||
@@ -353,9 +354,10 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
|
||||
ps_list.sort()
|
||||
|
||||
# Width of terminal in columns
|
||||
- columns = None
|
||||
+ columns = 80
|
||||
if cgroups:
|
||||
- _, columns = os.popen('stty size', 'r').read().split()
|
||||
+ if os.isatty(sys.stdout.fileno()):
|
||||
+ columns = shutil.get_terminal_size().columns
|
||||
|
||||
for pid in ps_list:
|
||||
ps_show_thread(pid, affect_children, ps, has_ctxt_switch_info,
|
||||
--
|
||||
2.38.1
|
||||
|
||||
113
SOURCES/tuna-Fix-show_threads-t-and-show_irqs-q.patch
Normal file
113
SOURCES/tuna-Fix-show_threads-t-and-show_irqs-q.patch
Normal file
@ -0,0 +1,113 @@
|
||||
From 1cfc9be610290f992299071d79031762cccbe2e6 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Fri, 30 May 2025 15:26:41 -0400
|
||||
Subject: [PATCH 2/4] tuna: Fix show_threads -t and show_irqs -q
|
||||
|
||||
Fix show_threads -t and show_irqs -q to not match everything if there is
|
||||
no match.
|
||||
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_threads | wc -l
|
||||
428
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_threads -t "nosuchthread" | wc -l
|
||||
0
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_threads -t "Isolated*" | wc -l
|
||||
55
|
||||
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_irqs -q "iwlwifi*" | wc -l
|
||||
14
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_irqs | wc -l
|
||||
58
|
||||
jkacur@fionn:~/src/tuna$ ./tuna-cmd.py show_irqs -q "nosuchirq" | wc -l
|
||||
0
|
||||
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 23 +++++++++++++++++++++--
|
||||
1 file changed, 21 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 4997eaa5de92..9496c61f0c2b 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -79,6 +79,7 @@ except:
|
||||
|
||||
ps = None
|
||||
irqs = None
|
||||
+match_requested = False
|
||||
|
||||
class HelpMessageParser(argparse.ArgumentParser):
|
||||
def error(self, message):
|
||||
@@ -391,6 +392,8 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
|
||||
irq_list_numbers, show_uthreads, show_kthreads,
|
||||
has_ctxt_switch_info, sock_inodes, sock_inode_re, cgroups, compact):
|
||||
|
||||
+ global match_requested
|
||||
+
|
||||
ps_list = []
|
||||
for pid in list(ps.keys()):
|
||||
iskth = tuna.iskthread(pid)
|
||||
@@ -422,7 +425,11 @@ def ps_show(ps, affect_children, thread_list, cpu_list,
|
||||
raise e
|
||||
if cpu_list and not set(cpu_list).intersection(set(affinity)):
|
||||
continue
|
||||
- ps_list.append(pid)
|
||||
+ if match_requested and thread_list and pid in thread_list:
|
||||
+ ps_list.append(pid)
|
||||
+ elif not match_requested:
|
||||
+ ps_list.append(pid)
|
||||
+
|
||||
|
||||
ps_list.sort()
|
||||
|
||||
@@ -498,6 +505,7 @@ def find_drivers_by_users(users):
|
||||
|
||||
def show_irqs(irq_list, cpu_list):
|
||||
global irqs
|
||||
+ global match_requested
|
||||
if not irqs:
|
||||
irqs = procfs.interrupts()
|
||||
|
||||
@@ -515,7 +523,11 @@ def show_irqs(irq_list, cpu_list):
|
||||
|
||||
if cpu_list and not set(cpu_list).intersection(set(affinity)):
|
||||
continue
|
||||
- sorted_irqs.append(irqn)
|
||||
+
|
||||
+ if match_requested and irq_list and irqn in irq_list:
|
||||
+ sorted_irqs.append(irqn)
|
||||
+ elif not match_requested:
|
||||
+ sorted_irqs.append(irqn)
|
||||
|
||||
sorted_irqs.sort()
|
||||
for irq in sorted_irqs:
|
||||
@@ -540,6 +552,9 @@ def do_list_op(op, current_list, op_list):
|
||||
|
||||
def threadstring_to_list(threadstr):
|
||||
global ps
|
||||
+ global match_requested
|
||||
+ if threadstr:
|
||||
+ match_requested = True
|
||||
thread_list = []
|
||||
thread_strings = list(set(threadstr.split(',')))
|
||||
for s in thread_strings:
|
||||
@@ -555,6 +570,9 @@ def threadstring_to_list(threadstr):
|
||||
|
||||
def irqstring_to_list(irqstr):
|
||||
|
||||
+ global match_requested
|
||||
+ if irqstr:
|
||||
+ match_requested = True
|
||||
irq_list = []
|
||||
irq_strings = list(set(irqstr.split(',')))
|
||||
for s in irq_strings:
|
||||
@@ -636,6 +654,7 @@ def nohz_full_to_cpu():
|
||||
_(" needs nohz_full=cpulist on the kernel command line"))
|
||||
sys.exit(2)
|
||||
|
||||
+
|
||||
def main():
|
||||
global ps
|
||||
|
||||
--
|
||||
2.49.0
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
From aca839256c548b1e4b6b891eb6e3e01d78972062 Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Mon, 28 Oct 2024 17:57:15 -0400
|
||||
Subject: [PATCH] tuna: Fix string syntax warnings with raw strings
|
||||
|
||||
tuna save <filename> allows you to save your kthreads tunables to
|
||||
a file to be used by rtctl. There were several backslashes that produce
|
||||
an error that pylint and Python (at least 3.12) gives a SyntaxWarning:
|
||||
invalid escape sequence
|
||||
|
||||
Switch the strings written to the file with raw strings to resolve the
|
||||
warning for this section of the code.
|
||||
|
||||
Tested by comparing the diffs of the files.
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
Signed-off-by: John B. Wyatt IV <sageofredondo@gmail.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 bd678e2..d4c3e2c 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -669,7 +669,7 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
# The regex is matched against process names as printed by "ps -eo cmd".
|
||||
|
||||
''' % filename)
|
||||
- f.write("kthreads:*:1:*:\[.*\]$\n\n")
|
||||
+ f.write(r"kthreads:*:1:*:\[.*\]$" + "\n\n")
|
||||
|
||||
per_cpu_kthreads = []
|
||||
names = list(kthreads.keys())
|
||||
@@ -688,7 +688,7 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
elif common[:8] == "softirq-":
|
||||
common = "(sirq|softirq)" + common[7:]
|
||||
name = "s" + name[4:]
|
||||
- regex = common + "\/.*"
|
||||
+ regex = common + r"\/.*"
|
||||
except:
|
||||
idx = 0
|
||||
regex = name
|
||||
@@ -701,9 +701,9 @@ def generate_rtgroups(filename, kthreads, nr_cpus):
|
||||
else:
|
||||
mask = ",".join([hex(a) for a in \
|
||||
procfs.hexbitmask(kt.affinity, nr_cpus)])
|
||||
- f.write("%s:%c:%d:%s:\[%s\]$\n" % (name, \
|
||||
+ f.write(r"%s:%c:%d:%s:\[%s\]$" % (name, \
|
||||
tuna_sched.sched_str(kt.policy)[6].lower(), \
|
||||
- kt.rtprio, mask, regex))
|
||||
+ kt.rtprio, mask, regex) + "\n")
|
||||
f.close()
|
||||
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 2d0f78751760bcc737bc4b3530d77b05aaa1c286 Mon Sep 17 00:00:00 2001
|
||||
From 0c93bd0f26c3d7abda51e51a43ea979ecd794cc9 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Wed, 18 Oct 2023 10:54:49 -0400
|
||||
Subject: [PATCH 2/2] tuna: Remove spec file from git
|
||||
|
||||
@ -1,104 +0,0 @@
|
||||
From ff1963daf4d5a23e5f9476710e983ab781210608 Mon Sep 17 00:00:00 2001
|
||||
From: John Kacur <jkacur@redhat.com>
|
||||
Date: Tue, 27 Sep 2022 12:59:54 -0400
|
||||
Subject: [PATCH 1/2] tuna: Replace python_ethtool with builtin funtionality
|
||||
|
||||
This patch replaces the dependency on python_ethtool with some
|
||||
simplified functions to achieve the same result.
|
||||
|
||||
Reviewed-by: Federico Pellegrin <fede@evolware.org>
|
||||
- return 'tun' only if tun_flags exists
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 2 +-
|
||||
tuna/gui/irqview.py | 2 +-
|
||||
tuna/new_eth.py | 37 +++++++++++++++++++++++++++++++++++++
|
||||
tuna/tuna.py | 2 +-
|
||||
4 files changed, 40 insertions(+), 3 deletions(-)
|
||||
create mode 100755 tuna/new_eth.py
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index bdaa70ffc156..21a70cf1d37d 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -25,7 +25,7 @@ import fnmatch
|
||||
import gettext
|
||||
import locale
|
||||
from functools import reduce
|
||||
-import ethtool
|
||||
+import tuna.new_eth as ethtool
|
||||
import tuna.tuna_sched as tuna_sched
|
||||
import procfs
|
||||
from tuna import tuna, sysfs
|
||||
diff --git a/tuna/gui/irqview.py b/tuna/gui/irqview.py
|
||||
index 35fc3fd0b0ca..5143d6dc0df5 100755
|
||||
--- a/tuna/gui/irqview.py
|
||||
+++ b/tuna/gui/irqview.py
|
||||
@@ -7,7 +7,7 @@ from gi.repository import Gtk
|
||||
from gi.repository import GObject
|
||||
import os
|
||||
from functools import reduce
|
||||
-import ethtool
|
||||
+import tuna.new_eth as ethtool
|
||||
import tuna.tuna_sched as tuna_sched
|
||||
|
||||
import gi
|
||||
diff --git a/tuna/new_eth.py b/tuna/new_eth.py
|
||||
new file mode 100755
|
||||
index 000000000000..98f9179d5695
|
||||
--- /dev/null
|
||||
+++ b/tuna/new_eth.py
|
||||
@@ -0,0 +1,37 @@
|
||||
+# Copyright (C) 2022 John Kacur
|
||||
+""" A few functions similar to ethtool """
|
||||
+import os
|
||||
+import socket
|
||||
+
|
||||
+def get_active_devices():
|
||||
+ """ return a list of network devices """
|
||||
+ ret = []
|
||||
+
|
||||
+ for device in socket.if_nameindex():
|
||||
+ ret.append(device[1])
|
||||
+
|
||||
+ return ret
|
||||
+
|
||||
+def get_module(intf):
|
||||
+ """ return the kernel module for the given network interface """
|
||||
+ if intf == 'lo':
|
||||
+ return ""
|
||||
+ myp = f'/sys/class/net/{intf}/device/driver'
|
||||
+ if os.path.exists(myp):
|
||||
+ return os.path.basename(os.readlink(myp))
|
||||
+ if os.path.exists(f'/sys/class/net/{intf}/bridge'):
|
||||
+ return 'bridge'
|
||||
+ if os.path.exists(f'/sys/class/net/{intf}/tun_flags'):
|
||||
+ return 'tun'
|
||||
+ return ""
|
||||
+
|
||||
+if __name__ == "__main__":
|
||||
+ nics = get_active_devices()
|
||||
+ print(f'nics = {nics}')
|
||||
+
|
||||
+ for intf in nics:
|
||||
+ driver = get_module(intf)
|
||||
+ if driver:
|
||||
+ print(f'{intf}, {driver}')
|
||||
+ else:
|
||||
+ print(f'{intf}')
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index 31707c9cb69c..84419c957b1b 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -9,7 +9,7 @@ import sys
|
||||
import shlex
|
||||
import fnmatch
|
||||
import platform
|
||||
-import ethtool
|
||||
+import tuna.new_eth as ethtool
|
||||
import procfs
|
||||
from procfs import utilist
|
||||
from tuna import help
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
From 47f2e64a5ca558fabf25464ac4d2db8c949b3166 Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Tue, 29 Jul 2025 10:29:21 -0400
|
||||
Subject: [PATCH 10/10] tuna: disable cpu_power functionality for RHEL9
|
||||
currently.
|
||||
|
||||
At the time libcpupower's bindings were not backported to RHEL9, but we
|
||||
want to backport this functionality and more. If you wish to use the
|
||||
bindings please use RHEL10 or make a request.
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
---
|
||||
tuna-cmd.py | 20 ++++++++++----------
|
||||
1 file changed, 10 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index d0a3e6b..c8e1cbd 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -91,7 +91,7 @@ def gen_parser():
|
||||
|
||||
|
||||
POS = {
|
||||
- "cpu_list": dict(metavar='CPU-LIST', type=tuna.cpustring_to_list, help="CPU-LIST affected by commands"),
|
||||
+ # "cpu_list": dict(metavar='CPU-LIST', type=tuna.cpustring_to_list, help="CPU-LIST affected by commands"), # disable currently in RHEL9; please use RHEL10 or later
|
||||
"thread_list": dict(metavar='THREAD-LIST', type=threadstring_to_list, help="THREAD-LIST affected by commands"),
|
||||
"filename": dict(metavar='FILENAME', type=str, help="Save kthreads sched tunables to this file"),
|
||||
"profilename": dict(type=str, help="Apply changes described in this file"),
|
||||
@@ -133,9 +133,9 @@ def gen_parser():
|
||||
|
||||
subparser = parser.add_subparsers(dest='command')
|
||||
|
||||
- idle_set = subparser.add_parser('cpu_power',
|
||||
- description='Manage CPU idle state disabling (requires libcpupower and it\'s Python bindings)',
|
||||
- help='Set all idle states on a given CPU-LIST.')
|
||||
+ # idle_set = subparser.add_parser('cpu_power',
|
||||
+ # description='Manage CPU idle state disabling (requires libcpupower and it\'s Python bindings)',
|
||||
+ # help='Set all idle states on a given CPU-LIST.')
|
||||
isolate = subparser.add_parser('isolate', description="Move all allowed threads and IRQs away from CPU-LIST",
|
||||
help="Move all allowed threads and IRQs away from CPU-LIST")
|
||||
include = subparser.add_parser('include', description="Allow all threads to run on CPU-LIST",
|
||||
@@ -228,12 +228,12 @@ def gen_parser():
|
||||
show_irqs_group.add_argument('-S', '--sockets', **MODS['sockets'])
|
||||
show_irqs.add_argument('-q', '--irqs', **MODS['irqs'])
|
||||
|
||||
- idle_set_group = idle_set.add_mutually_exclusive_group(required=True)
|
||||
- idle_set_group.add_argument('-i', '--idle-info', **MODS['idle_info'])
|
||||
- idle_set_group.add_argument('-s', '--status', **MODS['idle_state_disabled_status'])
|
||||
- idle_set_group.add_argument('-d', '--disable', **MODS['disable_idle_state'])
|
||||
- idle_set_group.add_argument('-e', '--enable', **MODS['enable_idle_state'])
|
||||
- idle_set.add_argument('-c', '--cpus', **MODS['cpus'])
|
||||
+ # idle_set_group = idle_set.add_mutually_exclusive_group(required=True)
|
||||
+ # idle_set_group.add_argument('-i', '--idle-info', **MODS['idle_info'])
|
||||
+ # idle_set_group.add_argument('-s', '--status', **MODS['idle_state_disabled_status'])
|
||||
+ # idle_set_group.add_argument('-d', '--disable', **MODS['disable_idle_state'])
|
||||
+ # idle_set_group.add_argument('-e', '--enable', **MODS['enable_idle_state'])
|
||||
+ # idle_set.add_argument('-c', '--cpus', **MODS['cpus'])
|
||||
|
||||
what_is.add_argument('thread_list', **POS['thread_list'])
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
From d856581ce887c16027d8a2353e3f1701385e9fa9 Mon Sep 17 00:00:00 2001
|
||||
From: "John B. Wyatt IV" <jwyatt@redhat.com>
|
||||
Date: Wed, 30 Jul 2025 11:48:50 -0400
|
||||
Subject: [PATCH] tuna: replace match with if statements as a workaround
|
||||
|
||||
The match-case keyword statements were introduced in Python 3.10. At the
|
||||
time RHEL 9 only has Python 3.9.
|
||||
|
||||
Signed-off-by: John B. Wyatt IV <jwyatt@redhat.com>
|
||||
---
|
||||
tuna/cpupower.py | 25 ++++++++++++-------------
|
||||
1 file changed, 12 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/tuna/cpupower.py b/tuna/cpupower.py
|
||||
index ec04b90..ecb2507 100755
|
||||
--- a/tuna/cpupower.py
|
||||
+++ b/tuna/cpupower.py
|
||||
@@ -38,20 +38,19 @@ if have_cpupower:
|
||||
self.__cpu_list = utils.get_all_cpu_list()
|
||||
|
||||
def handle_common_lcpw_errors(self, e, error_type, idle_name):
|
||||
- match e:
|
||||
- case 0:
|
||||
- pass
|
||||
- case -1:
|
||||
- print(f"Idlestate {idle_name} not available", file=sys.stderr)
|
||||
- case -2:
|
||||
- print("Disabling is not supported by the kernel", file=sys.stderr)
|
||||
- case -3:
|
||||
- if error_type == Cpupower.LCPW_ERROR_THREE_CASE:
|
||||
- print("No write access to disable/enable C-states: try using sudo", file=sys.stderr)
|
||||
- else:
|
||||
- print(f"Not documented: {e}", file=sys.stderr)
|
||||
- case _:
|
||||
+ if e == 0:
|
||||
+ pass
|
||||
+ elif e == -1:
|
||||
+ print(f"Idlestate {idle_name} not available", file=sys.stderr)
|
||||
+ elif e == -2:
|
||||
+ print("Disabling is not supported by the kernel", file=sys.stderr)
|
||||
+ elif e == -3:
|
||||
+ if error_type == Cpupower.LCPW_ERROR_THREE_CASE:
|
||||
+ print("No write access to disable/enable C-states: try using sudo", file=sys.stderr)
|
||||
+ else:
|
||||
print(f"Not documented: {e}", file=sys.stderr)
|
||||
+ else:
|
||||
+ print(f"Not documented: {e}", file=sys.stderr)
|
||||
|
||||
def get_idle_states(self, cpu):
|
||||
"""
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,66 +0,0 @@
|
||||
From e9f60274865475c4e9081ee356ffbc61d1df2ade Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Wed, 2 Nov 2022 10:57:19 -0400
|
||||
Subject: [PATCH 3/3] tuna: tuna-cmd.py use fstrings
|
||||
|
||||
Add fstrings where possible to improve readabilty
|
||||
|
||||
Due to the discussion regarding dropping the language feature, gettext
|
||||
shorthand _() have been removed.
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
|
||||
diff --git a/tuna-cmd.py b/tuna-cmd.py
|
||||
index 79e33371837e..75b63da972c2 100755
|
||||
--- a/tuna-cmd.py
|
||||
+++ b/tuna-cmd.py
|
||||
@@ -176,13 +176,16 @@ def thread_help(tid):
|
||||
ps = procfs.pidstats()
|
||||
|
||||
if tid not in ps:
|
||||
- print("tuna: " + _("thread %d doesn't exists!") % tid)
|
||||
+ print(f"tuna: thread {tid} doesn't exist!")
|
||||
return
|
||||
|
||||
pinfo = ps[tid]
|
||||
cmdline = procfs.process_cmdline(pinfo)
|
||||
help, title = tuna.kthread_help_plain_text(tid, cmdline)
|
||||
- print("%s\n\n%s" % (title, _(help)))
|
||||
+ print(title, "\n\n")
|
||||
+ if help.isspace():
|
||||
+ help = "No help description available."
|
||||
+ print(help)
|
||||
|
||||
|
||||
def save(cpu_list, thread_list, filename):
|
||||
@@ -208,7 +211,7 @@ def ps_show_header(has_ctxt_switch_info, cgroups=False):
|
||||
|
||||
def ps_show_sockets(pid, ps, inodes, inode_re, indent=0):
|
||||
header_printed = False
|
||||
- dirname = "/proc/%s/fd" % pid
|
||||
+ dirname = f"/proc/{pid}/fd"
|
||||
try:
|
||||
filenames = os.listdir(dirname)
|
||||
except: # Process died
|
||||
@@ -650,7 +653,7 @@ def main():
|
||||
try:
|
||||
gui_refresh=int(a)
|
||||
except Exception as err:
|
||||
- print("tuna: --refresh %s" % err)
|
||||
+ print(f"tuna: --refresh {err}")
|
||||
sys.exit(2)
|
||||
elif o in ("-d", "--disable_perf"):
|
||||
run_gui = True
|
||||
@@ -679,7 +682,7 @@ def main():
|
||||
try:
|
||||
tuna.threads_set_priority(thread_list, a, affect_children)
|
||||
except OSError as err:
|
||||
- print("tuna: %s" % err)
|
||||
+ print(f"tuna: {err}")
|
||||
sys.exit(2)
|
||||
elif o in ("-P", "--show_threads"):
|
||||
# If the user specified process names that weren't
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,94 +0,0 @@
|
||||
From 5f90d8b80a259884d3ca2a647fdf9471b7d7091c Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Mon, 31 Oct 2022 13:15:07 -0400
|
||||
Subject: [PATCH 1/3] tuna: tuna.py use fstrings
|
||||
|
||||
Add fstrings where possible to improve readabilty
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
|
||||
diff --git a/tuna/tuna.py b/tuna/tuna.py
|
||||
index 84419c957b1b..e64211b88fc3 100755
|
||||
--- a/tuna/tuna.py
|
||||
+++ b/tuna/tuna.py
|
||||
@@ -58,7 +58,7 @@ def iskthread(pid):
|
||||
# in this function, so that they know that the thread vanished and
|
||||
# can act accordingly, removing entries from tree views, etc
|
||||
try:
|
||||
- f = open("/proc/%d/smaps" % pid)
|
||||
+ f = open(f"/proc/{pid}/smaps")
|
||||
except IOError:
|
||||
# Thread has vanished
|
||||
return True
|
||||
@@ -88,7 +88,7 @@ def is_irq_thread(cmd):
|
||||
return cmd[:4] in ("IRQ-", "irq/")
|
||||
|
||||
def threaded_irq_re(irq):
|
||||
- return re.compile("(irq/%s-.+|IRQ-%s)" % (irq, irq))
|
||||
+ return re.compile(f"(irq/{irq}-.+|IRQ-{irq})")
|
||||
|
||||
# FIXME: Move to python-linux-procfs
|
||||
def has_threaded_irqs(ps):
|
||||
@@ -96,10 +96,10 @@ def has_threaded_irqs(ps):
|
||||
return len(ps.find_by_regex(irq_re)) > 0
|
||||
|
||||
def set_irq_affinity_filename(filename, bitmasklist):
|
||||
- pathname = "/proc/irq/%s" % filename
|
||||
+ pathname = f"/proc/irq/{filename}"
|
||||
f = open(pathname, "w")
|
||||
text = ",".join(["%x" % a for a in bitmasklist])
|
||||
- f.write("%s\n" % text)
|
||||
+ f.write(f"{text}\n")
|
||||
try:
|
||||
f.close()
|
||||
except IOError:
|
||||
@@ -225,7 +225,7 @@ def move_threads_to_cpu(cpus, pid_list, set_affinity_warning=None, spread=False)
|
||||
if pid not in ps:
|
||||
continue
|
||||
|
||||
- threads = procfs.pidstats("/proc/%d/task" % pid)
|
||||
+ threads = procfs.pidstats(f"/proc/{pid}/task")
|
||||
for tid in list(threads.keys()):
|
||||
try:
|
||||
curr_affinity = os.sched_getaffinity(tid)
|
||||
@@ -320,11 +320,11 @@ def affinity_remove_cpus(affinity, cpus, nr_cpus):
|
||||
# Should be moved to python_linux_procfs.interrupts, shared with interrupts.parse_affinity, etc.
|
||||
def parse_irq_affinity_filename(filename, nr_cpus):
|
||||
try:
|
||||
- f = open("/proc/irq/%s" % filename)
|
||||
+ f = open(f"/proc/irq/{filename}")
|
||||
except IOError as err:
|
||||
if procfs.is_s390():
|
||||
print("This operation is not supported on s390", file=sys.stderr)
|
||||
- print("tuna: %s" % err, file=sys.stderr)
|
||||
+ print(f"tuna: {err}", file=sys.stderr)
|
||||
sys.exit(2)
|
||||
|
||||
line = f.readline()
|
||||
@@ -627,19 +627,19 @@ def run_command(cmd, policy, rtprio, cpu_list):
|
||||
try:
|
||||
thread_set_priority(pid, policy, rtprio)
|
||||
except (SystemError, OSError) as err:
|
||||
- print("tuna: %s" % err)
|
||||
+ print(f"tuna: {err}")
|
||||
sys.exit(2)
|
||||
if cpu_list:
|
||||
try:
|
||||
os.sched_setaffinity(pid, cpu_list)
|
||||
except (SystemError, OSError) as err:
|
||||
- print("tuna: %s" % err)
|
||||
+ print(f"tuna: {err}")
|
||||
sys.exit(2)
|
||||
|
||||
try:
|
||||
os.execvp(cmd_list[0], cmd_list)
|
||||
except (SystemError, OSError) as err:
|
||||
- print("tuna: %s" % err)
|
||||
+ print(f"tuna: {err}")
|
||||
sys.exit(2)
|
||||
else:
|
||||
os.waitpid(newpid, 0)
|
||||
--
|
||||
2.31.1
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
From f53f77f73199f398713f8edfdfa417cf8b9e1a74 Mon Sep 17 00:00:00 2001
|
||||
From: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Date: Fri, 28 Oct 2022 13:14:04 -0400
|
||||
Subject: [PATCH 2/3] tuna: tuna_gui.py use fstrings
|
||||
|
||||
Add fstrings where possible to improve readabilty
|
||||
|
||||
Signed-off-by: Leah Leshchinsky <lleshchi@redhat.com>
|
||||
Signed-off-by: John Kacur <jkacur@redhat.com>
|
||||
|
||||
diff --git a/tuna/tuna_gui.py b/tuna/tuna_gui.py
|
||||
index f1f2caacbcba..459f90303ed5 100755
|
||||
--- a/tuna/tuna_gui.py
|
||||
+++ b/tuna/tuna_gui.py
|
||||
@@ -33,7 +33,7 @@ class main_gui:
|
||||
if self.check_root():
|
||||
sys.exit(1)
|
||||
for dir in tuna_glade_dirs:
|
||||
- tuna_glade = "%s/tuna_gui.glade" % dir
|
||||
+ tuna_glade = f"{dir}/tuna_gui.glade"
|
||||
if os.access(tuna_glade, os.F_OK):
|
||||
break
|
||||
self.wtree = Gtk.Builder()
|
||||
--
|
||||
2.31.1
|
||||
|
||||
274
SPECS/tuna.spec
274
SPECS/tuna.spec
@ -1,30 +1,32 @@
|
||||
Name: tuna
|
||||
Version: 0.18
|
||||
Version: 0.19
|
||||
Release: 9%{?dist}
|
||||
License: GPL-2.0-only AND LGPL-2.1-only
|
||||
Summary: Application tuning GUI & command line utility
|
||||
Group: Applications/System
|
||||
Source: https://www.kernel.org/pub/software/utils/tuna/%{name}-%{version}.tar.xz
|
||||
URL: https://git.kernel.org/pub/scm/utils/tuna/tuna.git
|
||||
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python3-devel, gettext
|
||||
Requires: python3-linux-procfs >= 0.6
|
||||
# This really should be a Suggests...
|
||||
# Requires: python-inet_diag
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
# PATCHES
|
||||
Patch1: tuna-Replace-python_ethtool-with-builtin-funtionalit.patch
|
||||
Patch2: tuna-Fix-matching-irqs-in-ps_show_thread.patch
|
||||
Patch3: tuna-tuna.py-use-fstrings.patch
|
||||
Patch4: tuna-tuna_gui.py-use-fstrings.patch
|
||||
Patch5: tuna-tuna-cmd.py-use-fstrings.patch
|
||||
Patch6: tuna-Adapt-show_threads-cgroup-output-to-terminal-si.patch
|
||||
Patch7: tuna-Fix-show_threads-cgroup-without-a-term.patch
|
||||
Patch8: Add-SPDX-license-identifiers.patch
|
||||
Patch9: tuna-Remove-spec-file-from-git.patch
|
||||
Patch10: tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch
|
||||
# Patches
|
||||
Patch01: Add-SPDX-license-identifiers.patch
|
||||
Patch02: tuna-Remove-spec-file-from-git.patch
|
||||
Patch03: tuna-Don-t-start-the-gui-if-a-display-is-not-availab.patch
|
||||
Patch04: 0001-tuna-extract-common-cpu-and-nics-determination-code-.patch
|
||||
Patch05: 0002-tuna-Add-idle_state-control-functionality.patch
|
||||
Patch06: 0003-tuna-utils-A-few-tweaks.patch
|
||||
Patch07: tuna-replace-match-with-if-statements-as-a-workaroun.patch
|
||||
Patch08: tuna-Fix-string-syntax-warnings-with-raw-strings.patch
|
||||
Patch09: 0001-tuna-Fix-help.py-syntax-warnings.patch
|
||||
Patch10: 0002-tuna-help.py.patch
|
||||
Patch11: tuna-Fix-show_threads-t-and-show_irqs-q.patch
|
||||
Patch12: tuna-Fix-run-command-failing-to-apply-BATCH-policy.patch
|
||||
Patch13: tuna-Add-U-and-K-to-the-move-command.patch
|
||||
Patch14: tuna-disable-cpu_power-functionality-for-RHEL9-curre.patch
|
||||
|
||||
%description
|
||||
Provides interface for changing scheduler and IRQ tunables, at whole CPU and at
|
||||
@ -36,14 +38,16 @@ Can be used as a command line utility without requiring the GUI libraries to be
|
||||
installed.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%autosetup -v -p1
|
||||
|
||||
%build
|
||||
%{__python3} setup.py build
|
||||
%py3_build
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tuna/
|
||||
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tuna-cmd.py
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||
%py3_install
|
||||
mkdir -p %{buildroot}/%{_sysconfdir}/tuna/
|
||||
mkdir -p %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads,%{_mandir}/man8}
|
||||
mkdir -p %{buildroot}/%{_datadir}/polkit-1/actions/
|
||||
@ -55,9 +59,6 @@ install -p -m644 etc/tuna/example.conf %{buildroot}/%{_sysconfdir}/tuna/
|
||||
install -p -m644 etc/tuna.conf %{buildroot}/%{_sysconfdir}/
|
||||
install -p -m644 org.tuna.policy %{buildroot}/%{_datadir}/polkit-1/actions/
|
||||
|
||||
# Manually fix the shebang
|
||||
pathfix.py -pni "%{__python3}" %{buildroot}%{_bindir}/tuna
|
||||
|
||||
# l10n-ed message catalogues
|
||||
for lng in `cat po/LINGUAS`; do
|
||||
po=po/"$lng.po"
|
||||
@ -67,11 +68,7 @@ done
|
||||
|
||||
%find_lang %name
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc ChangeLog
|
||||
%{python3_sitelib}/*.egg-info
|
||||
%{_bindir}/tuna
|
||||
@ -83,122 +80,203 @@ rm -rf %{buildroot}
|
||||
%{_datadir}/polkit-1/actions/org.tuna.policy
|
||||
|
||||
%changelog
|
||||
* Wed Dec 13 2023 John Kacur <jkacur@redhat.com> - 0.18-9
|
||||
* Wed Aug 06 2025 John B. Wyatt IV <jwyatt@redhat.com> - 0.19-9
|
||||
- Disable cpu_power from showing in help menu and checking for cpu_power
|
||||
match functionality.
|
||||
Resolves: RHEL-107847
|
||||
|
||||
* Wed Aug 06 2025 John Kacur <jkacur@redhat.com> - 0.19-8
|
||||
- Fix show_threads -t and show_irqs -q to not match everything if no match
|
||||
- Fix run command failing to apply BATCH policy
|
||||
- Add -U and -K to the move command
|
||||
Resolves: RHEL-86862 RHEL-106065 RHEL-106066
|
||||
|
||||
* Thu Jul 31 2025 John B. Wyatt IV <jwyatt@redhat.com> - 0.19-7
|
||||
- Applied tuna: Fix help.py syntax warnings and tuna: help.py
|
||||
Resolves: RHEL-106289
|
||||
|
||||
* Thu Jul 31 2025 John B. Wyatt IV - 0.19-6
|
||||
- Fix syntax warnings with raw strings
|
||||
Resolves: RHEL-106287
|
||||
|
||||
* Tue Jul 29 2025 John B. Wyatt IV - 0.19-5
|
||||
- Add cpu_power command
|
||||
Resolves: RHEL-106293
|
||||
|
||||
* Wed Dec 13 2023 John Kacur <jkacur@redhat.com> - 0.19-4
|
||||
- Add an rpminspect.yaml file
|
||||
Resolves: RHEL-19396
|
||||
|
||||
* Wed Dec 13 2023 John Kacur <jkacur@redhat.com> - 0.19-3
|
||||
- Don't start the gui if a display is not available
|
||||
- Revert removing distutils for rhel8
|
||||
- Update the License tag in the specfile to the spdx version
|
||||
Resolves: RHEL-19179
|
||||
- Change to SPDX licence tag in the specfile
|
||||
Resolves: RHEL-8859
|
||||
|
||||
* Mon Dec 11 2023 John Kacur <jkacur@redhat.com> - 0.18-8
|
||||
- Remove deprecated distutils from setup
|
||||
- Adjust SPDX patch to accomdate the removed distutils
|
||||
Resolves: RHEL-19037
|
||||
* Thu Nov 02 2023 John Kacur <jkacur@redhat.com> - 0.19-2
|
||||
- Add SPDX licenses
|
||||
- Remove the git maintained spec file
|
||||
Resolves: RHEL-7611
|
||||
|
||||
* Wed Nov 01 2023 John Kacur <jkacur@redhat.com> - 0.18-7
|
||||
- Remove specfile from upstream source
|
||||
Resolves: RHEL-9197
|
||||
* Thu Nov 02 2023 John Kacur <jkacur@redhat.com> - 0.19-1
|
||||
- Update to latest upstream version, tuna-0.19
|
||||
Resolves: RHEL-7862
|
||||
|
||||
* Wed Nov 23 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-6
|
||||
- Fix show_threads --cgroups without a term
|
||||
Resolves: rhbz#2121518
|
||||
* Wed Nov 23 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-12
|
||||
- Fix show_threads --cgroups run without term
|
||||
Resolves: rhbz#2121517
|
||||
|
||||
* Fri Nov 18 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-5
|
||||
* Fri Nov 18 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-11
|
||||
- Adapt show_threads cgroup output to terminal size
|
||||
Resolves: rhbz#2121518
|
||||
Resolves: rhbz#2121517
|
||||
|
||||
* Wed Nov 02 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-4
|
||||
* Wed Nov 09 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-10
|
||||
- Edit run_tests.sh to support new CLI changes
|
||||
Resolves: rhbz#2141349
|
||||
|
||||
* Tue Nov 08 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-9
|
||||
- Remove import and fix help message
|
||||
- Update manpages for argparse CLI changes
|
||||
Resolves: rhbz#2138692
|
||||
|
||||
* Wed Nov 02 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-8
|
||||
- Use f-strings in tuna where possible
|
||||
Resolves: rhbz#2120805
|
||||
Resolves: rhbz#2120803
|
||||
|
||||
* Mon Oct 03 2022 John Kacur <jkacur@redhat.com> - 0.18-3
|
||||
* Wed Oct 26 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-7
|
||||
- Add sockets command line option
|
||||
Resolves: rhbz#2122781
|
||||
|
||||
* Wed Oct 26 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-6
|
||||
- Update tuna command line interface
|
||||
- Move get_policy_and_rtprio call to parser level
|
||||
- Remove threads print statement
|
||||
Resolves: rhbz#2062865
|
||||
|
||||
* Mon Oct 03 2022 John Kacur <jkacur@redhat.com> - 0.18-5
|
||||
- Match irqs with "irqs/"
|
||||
Resolves: rhbz#2131353
|
||||
Resolves: rhbz#2131343
|
||||
|
||||
* Fri Sep 30 2022 John Kacur <jkacur@redhat.com> - 0.18-2
|
||||
* Fri Sep 30 2022 John Kacur <jkacur@redhat.com> - 0.18-4
|
||||
- Remove the "Requires" of python-ethtool from the specfile
|
||||
Resolves: rhbz#2123751
|
||||
|
||||
* Fri Sep 30 2022 John Kacur <jkacur@redhat.com> - 0.18-3
|
||||
- Replace dependency on python-ethtool with built-in functionality
|
||||
Resolves: rhbz#2123753
|
||||
Resolves: rhbz#2123751
|
||||
|
||||
* Wed Jun 29 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-2
|
||||
- Delete patches
|
||||
Resolves: rhbz#2068629
|
||||
|
||||
* Wed Jun 29 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.18-1
|
||||
- Rebase to upstream version 0.18
|
||||
Resolves: rhbz#2073555
|
||||
- Update to latest upstream tuna-0.18
|
||||
Resolves: rhbz#2068629
|
||||
|
||||
* Thu May 19 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-3
|
||||
- Add logging infrastructure to tuna
|
||||
* Wed May 11 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-4
|
||||
- Add logging infrastructure to tuna cmd
|
||||
- Add cleanlogs rule to Makefile
|
||||
Resolves: rhbz#2062882
|
||||
Resolves: rhbz#2062881
|
||||
|
||||
* Mon Apr 11 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-2
|
||||
* Mon Apr 11 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-3
|
||||
- Fix typo for variable parm
|
||||
- Handle get_policy_and_rtprio exceptions
|
||||
- Remove finally block in get_policy_and_rtprio
|
||||
Resolves: rhbz#2049746
|
||||
Resolves: rhbz#2049303
|
||||
|
||||
* Thu Jan 13 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-1
|
||||
- Rebase to upstream version 0.17
|
||||
* Thu Jan 13 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-2
|
||||
- Fix ModuleNotFoundError
|
||||
Resolves: rhbz#2012306
|
||||
Resolves: rhbz#2012307
|
||||
|
||||
* Tue Dec 14 2021 John Kacur <jkacur@redhat.com> - 0.16-5
|
||||
* Tue Jan 11 2022 Leah Leshchinsky <lleshchi@redhat.com> - 0.17-1
|
||||
- Rebase to upstream version 0.17
|
||||
Resolves: rhbz#2012307
|
||||
|
||||
* Tue Dec 14 2021 John Kacur <jkacur@redhat.com> - 0.16-6
|
||||
- Display correct cpu-affinity when a cpu is disabled
|
||||
Resolves: rhbz#2032614
|
||||
Resolves: rhbz#2032460
|
||||
|
||||
* Wed Nov 10 2021 John Kacur <jkacur@redhat.com> - 0.16-4
|
||||
* Thu Nov 11 2021 John Kacur <jkacur@redhat.com> - 0.16-5
|
||||
- Make it clear in online help and man pages that --include and --isolate
|
||||
affect IRQs as well as threads
|
||||
Resolves: rhbz#1886804
|
||||
Resolves: rhbz#2022142
|
||||
|
||||
* Tue Nov 02 2021 Leah Leshchinsky <lleshchi@redhat.com> - 0.16-4
|
||||
- Add distinction between spread and move to error message
|
||||
Resolves: rhbz#2012243
|
||||
|
||||
* Thu Oct 28 2021 John Kacur <jkacur@redhat.com> - 0.16-3
|
||||
- Print warning if setaffinity causes EBUSY and continue
|
||||
Resolves: rhbz#2018285
|
||||
Resolves: rhbz#2016540
|
||||
|
||||
* Tue Oct 26 2021 Leah Leshchinsky <lleshchi@redhat.com> - 0.16-2
|
||||
- Add distinction between --spread and --move to error message
|
||||
Resolves: rhbz#2012241
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.16-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
||||
* Wed Jun 30 2021 John Kacur <jkacur@redhat.com> - 0.16-1
|
||||
- Upgrade to latest upstream
|
||||
Resolves: rhbz#1947069
|
||||
- Update to latest upstream tuna-0.16
|
||||
Resolves: rhbz#1890565
|
||||
|
||||
* Thu Jan 21 2021 John Kacur <jkacur@redhat.com> - 0.15-1
|
||||
- Upgrade to latest upstream code
|
||||
- Upstream drops python-schedutils and uses built-in schedutils
|
||||
Resolves: rhbz#1890558
|
||||
* Mon Jun 14 2021 John Kacur <jkacur@redhat.com> - 0.15-3
|
||||
- Remove oscilloscope from tuna
|
||||
Resolves: rhbz#1970997
|
||||
|
||||
* Tue Apr 02 2019 Clark Williams <williams@redhat.com> - 0.14-4
|
||||
- added OSCI gating framework
|
||||
Resolves: rhbz#1682423
|
||||
* Fri May 21 2021 John Kacur <jkacur@redhat.com> - 0.15-2
|
||||
- Remove python3-schedutils from the Requires in the spec file
|
||||
- Update the URL in the spec file
|
||||
Resolves: rhbz#1890541
|
||||
|
||||
* Fri Feb 01 2019 John Kacur <jkacur@redhat.com> - 0.14-3
|
||||
- fix undefined global name stderr
|
||||
Resolves: rhbz#1671440
|
||||
* 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
|
||||
|
||||
* Tue Dec 04 2018 John Kacur <jkacur@redhat.com> - 0.14-2
|
||||
- Add method to compare class cpu for sorting
|
||||
- Use args attributes for exceptions for python3
|
||||
Resolves: rhbz#1651465
|
||||
* 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
|
||||
|
||||
* Fri Aug 10 2018 John Kacur <jkacur@redhat.com> - 0.14-1
|
||||
- Sync with upstream and fix URL reference in spec
|
||||
Resolves: rhbz#1596855
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Wed Aug 08 2018 John Kacur <jkacur@redhat.com> - 0.13.3-5
|
||||
- Remove some functions that are now available in python-linux-procfs
|
||||
Resolves: rhbz#1522865
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jul 03 2018 Tomas Orsava <torsava@redhat.com> - 0.13.3-4
|
||||
- Switch hardcoded python3 shebangs into the %%{__python3} macro
|
||||
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.14.1-2
|
||||
- Rebuilt for Python 3.9
|
||||
|
||||
* Thu May 31 2018 John Kacur <jkacur@redhat.com> - 0.13.3-3
|
||||
- Remove deprecated oscilloscope
|
||||
Resolves: rhbz#1584302
|
||||
* Thu May 21 2020 Jiri Kastner <jkastner@fedoraproject.org> - 0.14.1
|
||||
- update to 0.14.1
|
||||
- fixes RHBZ#1773339
|
||||
|
||||
* Fri May 25 2018 John Kacur <jkacur@redhat.com> - 0.13.3-2
|
||||
- Correct the dependencies to require python3 package versions
|
||||
Resolves: rhbz#1581192
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed May 16 2018 John Kacur <jkacur@redhat.com> - 0.13.3-1
|
||||
- Changes for python3
|
||||
Resolves: rhbz#1518679
|
||||
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14-5
|
||||
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.14-4
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Feb 12 2019 Jiri Kastner <jkastner@fedoraproject.org> - 0.14-3
|
||||
- upload patch
|
||||
|
||||
* Tue Feb 12 2019 Jiri Kastner <jkastner@fedoraproject.org> - 0.14-2
|
||||
- oscilloscope gtk3 patch
|
||||
|
||||
* Tue Feb 12 2019 Jiri Kastner <jkastner@fedoraproject.org> - 0.14-1
|
||||
- update to 0.14
|
||||
- switch to python3
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 14 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.13.1-6
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
Loading…
Reference in New Issue
Block a user