Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuned ppd adjustments #646

Merged
merged 7 commits into from
Jul 23, 2024
Merged

Conversation

zacikpa
Copy link
Contributor

@zacikpa zacikpa commented Jun 21, 2024

This PR introduces small changes in and related to tuned-ppd:

  • The daemon now has the option to log output into a file (the default is /var/log/tuned/tuned-ppd.log).
  • The PID option was removed from the systems service file: the daemon currently does not write its PID anywhere.
  • The spec file is adjusted to include standard systems scriptlet macros according to Fedora guidelines.
  • When swapping power-profiles-daemon for tuned-ppd, scriptlets now check whether PPD is running and if yes, tuned-ppd is also started right away.

And adjust the systemd service file to log to
/var/log/tuned/tuned-ppd.log by default.

Additionally, add an option to turn on debug
level logging.
The daemon does not write its PID to any file.
@zacikpa zacikpa requested a review from yarda June 21, 2024 14:08
- Only use the default profile from the configuration file if
  TuneD is not already running with an active profile. This
  makes the daemon "recall" the active profile after a restart.

- Make sure that SIGHUP completely resets the daemon, including
  resetting the 'battery' and 'performance_degraded' status.
The profile may not change, so do not log that we are switching
a profile.
@zacikpa
Copy link
Contributor Author

zacikpa commented Jun 24, 2024

Added 3 more commits, most importantly an update which makes tuned-ppd recall a profile after being restarted.

Copy link
Contributor

@yarda yarda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it seems OK.

# start tuned-ppd right away
if [ -f %{_localstatedir}/lib/rpm-state/tuned/ppd-active ]; then
systemctl start tuned-ppd
rm -rf %{_localstatedir}/lib/rpm-state/tuned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably trigger rpmlint warning, thus it's better to do rm -f and then rmdir, but this is minor problem that can be ignored/waived or fixed later.

@yarda
Copy link
Contributor

yarda commented Jul 23, 2024

Rawhide CI failure is unrelated.

@yarda yarda merged commit 5b59b84 into redhat-performance:master Jul 23, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants