Since version 0.20, power-profiles-daemon exposes
its DBus interface under "org.freedesktop.UPower.PowerProfiles"
alongside the previous name. To be compatible with PPD, this commit
implements the same change into tuned-ppd.
Resolves: #683
Instead of querying TuneD each time we want to determine the active
TuneD profile, remember its value. Also watch for signals from TuneD,
updating the value when the TuneD profile changes (resolves#689).
The daemon now also keeps track of the "base" PPD profile, which is
restored when all profile holds are released or when tuned-ppd is
restarted. For the latter purpose, this profile is also saved in a file.
Direct access via two dictionaries (one for AC, one for DC)
was clumsy, this commit replaces it with a new class - ProfileMap.
- improved conditionals for better readability
- fixed tuned-ppd not to run install twice
- used macro for profiles path
- consolidated names of related variables
- updated Makefile to update the current profile paths during
installation
- fixed tests to use correct profile directory on RHEL/CentOS
- consolidated whitespaces and variable names in fixed tests
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
In #615, they were accidentally moved to /usr/lib/tuned/profiles/
where all profiles were migrated.
This also changes the location of `functions` file within
the repository, separating it from the profiles themselves.
Resolves#642.
The new profile sets the intel_acpi driver to passive mode to
be able to set the standard acpi governors (ondemand/userspace)
and provides more flexibility on the C-states, as it is exposed
as a new variable.
Signed-off-by: Christophe Fontaine <cfontain@redhat.com>
This is a minimal viable implementation of a post-loaded profile
feature. It was implemented to satisfy the needs of the
kernel_settings Ansible role.
https://github.com/linux-system-roles/kernel_settings
This feature allows us to apply a profile in a way that is
somewhat separate from the way profiles from the active_profile file
are applied. Namely, the post-loaded profile is always applied after
all the profiles from the active_profile (or more precisely, the
post-loaded profile is always put to the tail of the profile chain
when merging). Also, the post-loaded profile setting is not affected
by running 'tuned-adm profile <some profile>' - the post-loaded
profile remains applied.
The name of the post-loaded profile is stored in
/etc/tuned/post_loaded_profile.
The lack of support for multiple post-loaded profiles was more or less
an arbitrary decision. There are no problems with it, as far as I can
see. However, there is currently no use case for multiple post-loaded
profiles, so I decided to make things easier for our future selves -
it's one less thing to worry about if we need to make changes to the
profile loading logic. We can add support for multiple post-loaded
profiles anytime.
A number of other design decisions went into the
implementation. They are listed here:
https://github.com/redhat-performance/tuned/pull/272
Resolves: rhbz#1798183
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Previously, when unit tests were run, python would leave behind files
with bytecompiled modules. It's not useful, it just clutters the
repository. And it could potentially lead to problems - it seems to
have lead to some problem for me earlier today when running git bisect to
find out when `make test` started failing.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
As discussed in rhbz#1672213, the sap-hana-vmware profile is not needed
anymore and it only confuses users. Let's drop it.
Resolves: rhbz#1715541
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The tests are now in a good shape, so we can now run pylint on them
without getting a huge list of errors. In fact, we should lint them
to decrease the likelihood they'll go stale again.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
You can now specify the python runtime using the PYTHON variable.
E.g. you can use
make PYTHON=python3 install
to install tuned modules to the python3 directory and rewrite
shebangs on executable Python files to use Python3.
Use net plugin to disable large receive offload in sap-hana-vmware profile.
This also fixes rollback of the setting - previously, after unapplying
the profile, LRO would always be set to 'on', irrespectively of the
original setting.
The network interfaces which should have LRO disabled must be listed
in /etc/tuned/sap-hana-vmware-variables.conf, e.g. like this:
sap_hana_vmware_nic=eth0
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>