[PATCH 15/23] tuna: Add -U and -K to the spread command

John Kacur
2025-11-07T18:58:15Z

commit 4e10e5b34593052e6ce4a166796b10c72f978efd
add the feature
-U, --no_uthreads Operations will not affect user threads
-K, --no_kthreads Operations will not affect kernel
threads

to the move command

This also works for the spread command but the arguments need to be
added. Without this you also get an
AttributeError: 'Namespace' object has no attribute 'uthreads'

Fix this by adding the options to the spread group for argparse.

Signed-off-by: John Kacur <jkacur@redhat.com>
---
tuna-cmd.py | 2 ++
1 file changed, 2 insertions(+)

diff --git a/tuna-cmd.py b/tuna-cmd.py
index d0a3e6b7dbf8..9f5ce918054d 100755
--- a/tuna-cmd.py
+++ b/tuna-cmd.py
@@ -183,6 +183,8 @@ def gen_parser():
spread_group.add_argument('-N', '--nohz_full', **MODS['nohz_full'])
spread.add_argument('-t', '--threads', **MODS['threads'])
spread.add_argument('-q', '--irqs', **MODS['irqs'])
+ spread.add_argument('-U', '--no_uthreads', **MODS['no_uthreads'])
+ spread.add_argument('-K', '--no_kthreads', **MODS['no_kthreads'])

priority.add_argument('priority', **POS['priority'])
priority.add_argument('-t', '--threads', **MODS['threads'], required=True)
--
2.51.1