Now, in addition to the already supported Radeon power methods, it also
supports:
radeon_powersave=DPM
where DPM can be 'battery', 'balanced', or 'performance'.
It also supports fallback, so one can write:
radeon_powersave=balanced, auto
where it tries 'balanced' DPM profile and if it fails or is not
supported it fallbacks to the non DPM 'auto' profile.
As delimiters colon, semilocon, comma or whitespace can be used.
It also switched upstream profiles to prefer DPM.
https://github.com/redhat-performance/tuned/pull/32
Related: rhbz#1417659
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Previously if the profile was applied before all methods and
signals were exported on DBus, the daemon thread (_thread_code()
in daemon.py) could crash after attempting to emit a signal on DBus
announcing that a profile was applied.
A regular user is unlikely to run into the race in practice, but it
frequently happens when applying an empty profile for testing purposes.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
'systemctl is-system-running' is not enough to reliably check
if the system is shutting down. If the command is run when the system
is still starting up, it will report the state as 'starting', even if
the shutdown target is queued:
5463fa0a88/src/core/manager.c (L3457-L3465)
On the other hand, 'systemctl list-jobs' should always show
shutdown.target or reboot.target etc., when the system is shutting
down, as long as DBus is still running.
Resolves: rhbz#1475571
Resolves: rhbz#1488369
Resolves: rhbz#1488517
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Increase timeout for DBus method calls in tuned-adm to 40 seconds.
This is meant to prevent simultaneous timeouts in tuned-adm and
the tuned daemon.
Previously it could happen, that e.g.
tuned-adm profile <name>
was executed, issuing a DBus call to the tuned daemon,
then in response the tuned daemon would issue a DBus
call to Polkit in order to authorize the profile switch request, and
this call would time out. The call to Polkit would time out after the
default DBus timeout of 25 seconds and simultaneously the tuned-adm's
call to tuned daemon would also time out, because the same default
timeout was used. After that, if the fallback authorization method
in tuned daemon succeeded, the daemon would start applying the new
profile, and at the same time tuned-adm would use the fallback method,
which is restarting tuned (systemctl restart tuned). This could
potentially lead to all sorts of race conditions. Let's avoid that
by increasing the timeout in tuned-adm, so that tuned has time
to apply a profile after a failed Polkit call.
Related: rhbz#1475571
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Debug messages are now logged when setting some task's parameter
fails because the task vanished. Previously errors were logged.
Log messages (for kernel threads and zombie processes) or warnings
(otherwise) are now logged when setting a task's affinity fails because
its affinity is fixed. Previously either errors or nothing was logged,
depending on the specific case.
Resolves: rhbz#1474961
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Take the ignore_missing parameter into account in @command_get methods
so that error messages are not logged for missing files.
In some @command_get methods the ignore_missing parameter is not used,
because e.g. it is not applicable or the parameter is handled elsewhere
in the code.
Resolves: rhbz#1451435
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Don't log error in commands.execute() if MSR_IA32_ENERGY_PERF_BIAS
is not supported. A message with level WARN is already logged
afterwards:
WARNING tuned.plugins.plugin_cpu: your CPU doesn't support
MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias
Resolves: rhbz#1443182
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The udev monitor buffer size was increased to 1MB. Also, a new
configuration option 'udev_buffer_size' can be specified in
/etc/tuned/tuned-main.conf to set a different buffer size.
Values such as '204800', '200KB', '200 KB' (with space) or '1 MB'
are recognized. If no unit is specified, the number is taken as
the number of bytes.
Resolves: rhbz#1442306
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Configuration files for the recommend functionality can now be
added to the /etc/tuned/recommend.d and /usr/lib/tuned/recommend.d
directories. The format is the same as in /etc/tuned/recommend.conf.
The file /etc/tuned/recommend.conf takes precedence over the files
in the recommend.d directories. The files in the /etc/tuned/recommend.d
directory are merged with those in /usr/lib/tuned/recommend.d
(in case of name conflict the file from /etc/tuned/recommend.d is used)
and are evaluated in alphabetical order. The first file containing
a matching entry is used.
The /etc/tuned/recommend.d directory is meant mainly for use by
administrators. Third-party packages should install recommend
configuration files in /usr/lib/tuned/recommend.d.
Also, the file /usr/lib/tuned/recommend.conf was moved to
/usr/lib/tuned/recommend.d/50-tuned-recommend.conf.
Resolves: rhbz#1459146
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Implement a new 'tuned-adm profile_mode' command, which prints
the current profile mode - automatic vs. manual.
Related: rhbz#1459146
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
A profile can now be set in two modes: automatic and manual.
When the automatic mode is active, Tuned always activates the
recommended profile upon startup. This mode can be set using
the following command:
tuned-adm auto_profile
When the manual mode is active, the previously applied profile
is activated upon startup. This mode can be set by switching
to the desired profile, e.g.
tuned-adm profile throughput-performance
The mode is saved on the second line of /etc/tuned/active_profile.
When the file /etc/tuned/active_profile does not exist, or is
empty, automatic mode is enabled. When the file has only one line,
i.e. it was generated by a previous Tuned version, manual mode
is enabled so that the upgrade doesn't cause unexpected active profile
changes.
Related: rhbz#1459146
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Only 'y', 'yes', 't', 'true' and '1' are accepted as true values
for initrd_remove_dir (case insensitive). Other values are
interpreted as false.
Resolves: rhbz#1455161
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Tuna is already executed in the realtime profile which is included by
the realtime-virtual-host/guest profiles, there is no need to execute
it twice. Also fixed minor whitespace inconsistency.
Related: rhbz#1472840
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Also removed the parameter from the realtime profile, because it already
includes the network-latency profile.
Resolves: rhbz#1451073
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Steps to reproduce :
============
1. yum install tuned.
2. yum install tuned-profiles-cpu-partitioning.noarch
3. tuned-adm profile cpu-partitioning
4. tuned-adm verify -i
Verification failed, current system settings differ from the preset profile.
You can mostly fix this by Tuned restart, e.g.:
service tuned restart
Sometimes (if some plugins like bootloader are used) also reboot is required.
See tuned log file ('/var/log/tuned/tuned.log') for details.
Python traces are logged in /var/log/tuned/tuned.log file
INFO tuned.plugins.plugin_script: calling script '/usr/lib/tuned/cpu-partitioning/script.sh' with arguments '['verify', 'ignore_missing']'
ERROR tuned.plugins.plugin_script: script '/usr/lib/tuned/cpu-partitioning/script.sh' error: 1, 'Traceback (most recent call last):
File "/usr/libexec/tuned/defirqaffinity.py", line 102, in <module>
verify(mask)
File "/usr/libexec/tuned/defirqaffinity.py", line 64, in verify
interruptdirs.remove("2")
ValueError: list.remove(x): x not in list'
ERROR tuned.plugins.plugin_script: verify: failed: '[u'/usr/lib/tuned/cpu-partitioning/script.sh']'
If the value 2 is not in the list, call interruptdirs.remove("2") will throw ValueError: list.remove(x): x not in list'.
Fix the code to properly handle ValueError.
Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
Support changing the 'power_dpm_state' parameter of Radeon
GPUs. It only works if the 'dpm' power method is enabled.
Note that the 'dpm' power method cannot be enabled through
the video plugin, but it can be set using the bootloader plugin
using 'cmdline = radeon.dpm=1'.
The video plugin now recognizes a new 'radeon_dpm_state' option
which changes the dpm state. Possible values are 'battery',
'balanced' and 'performance' [1].
[video]
radeon_dpm_state=balanced
[1] https://wiki.archlinux.org/index.php/ATI#Dynamic_power_management
Resolves: rhbz#1417659
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
E.g.:
[myprofile]
process=myprocess1
process2=myprocess2.*
The myprofile will be recommended if there are 'myprocess1' and
'myprocess2.*' (e.g. myprocess2, myprocess21, myprocess2_whatever)
running.
Resolves: rhbz#1461838
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>