From: "John B. Wyatt IV" <jwyatt@redhat.com>
To: "Clark Williams" <williams@redhat.com>,
"John Kacur" <jkacur@redhat.com>,
"Crystal Wood" <crwood@redhat.com>
Cc: "John B. Wyatt IV" <jwyatt@redhat.com>,
linux-rt-users@vger.kernel.org,
kernel-rts-sst <kernel-rts-sst@redhat.com>,
"John B. Wyatt IV" <sageofredondo@gmail.com>
Subject: [PATCH v5 0/2] Add cpupower idle-state functionality
Date: Wed, 9 Apr 2025 15:31:31 -0400 [thread overview]
Message-ID: <20250409193136.44411-1-jwyatt@redhat.com> (raw)
This patch series adds idle-state functionality to control cpu power
usage and to test idle states.
The number of cpus was needed in the cpupower file; I extracted out the
previously local to tuna-cli.py functionality to a separate file so the
cpu code can be used in any file in Tuna and reduce duplications. The
nics code was similar so it was also extracted to reduce the number of
global variables.
Sincerely,
John Wyatt
Software Engineer, Core Kernel
Red Hat
Changes v4 -> v5:
- Additional changes by John Kacur suggested off list to make the code
more Pythonic, changing idle_set to cpu_power, and resolve some
miscellaneous issues.
- Changed error messages to use stderr as requested by Crystal Wood and
other suggestions.
- Removed Suggested-by for Crystal as she said it was unwarranted.
Changes v3 -> v4:
- Additional changes suggest by John Kacur around the use of
@classmethods that they should've been @staticmethods and the changes
needed for them.
- Changed the SPDX lines to be at the top of the files as requested by
John Kacur.
Changes v2 -> v3:
- Several small improvements suggested by John Kacur off list including
removing unnecessary string interpolation, renaming idle-set to idle_set,
and correct placement of docstrings.
Changes v1 -> v2:
- Numerous improvements suggested by Crystal Wood including message
text, output, error handling, moving a function to utils.py and
structure of the code.
- Fixed a libcpupower bindings detection error that did not show on
my local machine but did on a fresh install of Fedora GNOME 40
reported by John Kacur.
John B. Wyatt IV (2):
tuna: extract common cpu and nics determination code into a utils.py
file
tuna: Add idle_state control functionality
tuna-cmd.py | 64 +++++++++--------
tuna/cpupower.py | 177 +++++++++++++++++++++++++++++++++++++++++++++++
tuna/utils.py | 28 ++++++++
3 files changed, 239 insertions(+), 30 deletions(-)
create mode 100755 tuna/cpupower.py
create mode 100644 tuna/utils.py
--
2.49.0
next reply other threads:[~2025-04-09 19:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-09 19:31 John B. Wyatt IV [this message]
2025-04-09 19:31 ` [PATCH v5 1/2] tuna: extract common cpu and nics determination code into a utils.py file John B. Wyatt IV
2025-04-09 19:31 ` [PATCH v5 2/2] tuna: Add idle_state control functionality John B. Wyatt IV
2025-04-09 21:49 ` John Kacur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250409193136.44411-1-jwyatt@redhat.com \
--to=jwyatt@redhat.com \
--cc=crwood@redhat.com \
--cc=jkacur@redhat.com \
--cc=kernel-rts-sst@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=sageofredondo@gmail.com \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).