On Thu, Mar 10, 2022 at 12:17:36PM -0500, John Kacur wrote:
On Wed, 9 Mar 2022, Leah Leshchinsky wrote:
> These patches introduce a new command-line interface that provides
> distinct subcommands for the user.
> Through the use of argparse, users see simpler help menus and can
> view positional and optional arguments for all tuna commands.
> The internal implementation is also simplified by removing the need
> for a saved state for each iteration of parsing.
> v2 Removes unnecessary sample.py file added in previous version,
> moves changes to show_irqs() from patch 1/3 to 3/3.
> Leah Leshchinsky (3):
> tuna: Update command-line interface
> tuna: Edit param variable to print full policy name
> tuna: Remove unused functions and globals
> tuna-cmd.py | 633 ++++++++++++++++++++-------------------------------
> tuna/tuna.py | 7 +-
> 2 files changed, 246 insertions(+), 394 deletions(-)
This is a welcome change, thanks!
Some initial comments from running this without looking at the code.
usage: tuna-cmd.py [-h] [-v]
tuna - Application Tuning GUI
isolate Allow all threads to run on CPU-LIST
include Allow all threads to run on CPU-LIST
move Move selected entities to CPU-LIST
spread Spread selected entities over CPU-LIST
priority Set thread scheduler tunables: POLICY and RTPRIO
run fork a new process and run the COMMAND
save Save kthreads sched tunables to FILENAME
apply Apply changes described in profile
show Show a list for given SUBCOMMAND
what_is Provides help about selected entities
gui Start the GUI
-h, --help show this help message and exit
-v, --version show version
In the above the same message appears next to isolate and include.
isolate should say, "Move all allowed threads and IRQs away from CPU-LIST"
For include, don't forget to add the words "all allowed", this is
When I run help on the commands, I only get usage and options, I'd like to
see a little more information, or at least a repeat of the above lines.
(look at rhpkg, or fedpkg as an example)
I know I suggested "subcommands" because that's what we call them in
python argparse but from a user perspective, I think "Commands" makes
There appears to be missing functionality. Are you planning on adding that
in the future?
For example, current tuna has -G Display the processes with the type of
cgroups they are in, which could be added to the show command.
Also, current tuna allows you to specify that operations apply only to
kthreads or only to uthreads that could be added to a few commands as
After you make a few more changes (I need to look a bit more closely at
the implementation and comment there as well) I'll put this in a separate
branch, but I don't think it needs to live there very long, I'd like to
integrate this relatively soon.
Thank you for the review.
I will make the necessary changes to the usage menus.
The functionality for options like -D to display cgroups,
and filtering by kthreads/uthreads is actually implemented
and can be viewed by commands such as "tuna show threads -h",
but I will add a note on the help menus to make it clearer
to users that these optionals exist.