1
0
Fork 0
Commit graph

934 commits

Author SHA1 Message Date
Jaroslav Škarvada
eef09f1185
plugin_video: merged radeon 'dpm' into radeon_powersave
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>
2017-09-19 14:57:26 +02:00
Jaroslav Škarvada
dd6460be8d Merge pull request #32 from olysonek/radeon
[WIP] Video plugin improvements
2017-09-19 11:57:55 +02:00
Jaroslav Škarvada
ab598cd6ef Merge pull request #63 from olysonek/logging
Improve logging
2017-08-29 18:21:35 +02:00
Jaroslav Škarvada
d2c170a42e
plugin_systemd: on full_rollback notify about need of initrd regeneration
Resolves: rhbz#1469258

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-08-29 13:48:14 +02:00
Ondřej Lysoněk
f9f5b073a5 scheduler: Improve logging
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>
2017-08-29 13:47:13 +02:00
Ondřej Lysoněk
ff6f69f604 Don't log errors about missing files on verify with ignore_missing set
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>
2017-08-28 14:45:29 +02:00
Jaroslav Škarvada
bccfe3e8d1 sap-hana: fixed description of the sap-hana profiles
Resolves: rhbz#1482005

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-08-21 13:40:22 +02:00
Jaroslav Škarvada
43c1b819d3 Merge pull request #62 from olysonek/epb_unsupported_log_msg
cpu: Don't log error in execute() if EPB is not supported
2017-08-21 12:54:58 +02:00
Ondřej Lysoněk
acc1427a4f cpu: Don't log error in execute() if EPB is not supported
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>
2017-08-21 12:34:27 +02:00
Jaroslav Škarvada
2c3d96621e
spec: make kernel-tools weak dep
The kernel-tools is not available on all arches and Tuned can work
without it.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-08-21 11:15:30 +02:00
Ondřej Lysoněk
750530de2e bootloader: Don't add nonexistent overlay image to grub.cfg
Resolves: rhbz#1454340

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-08-16 09:59:35 +02:00
Jaroslav Škarvada
a83170deb7 Merge pull request #61 from olysonek/udev_monitor_buffer_size
Increase udev monitor buffer size, make it configurable
2017-08-15 15:51:33 +02:00
Ondřej Lysoněk
36aa31efb4 Increase udev monitor buffer size, make it configurable
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>
2017-08-15 13:04:01 +02:00
Jaroslav Škarvada
79e519784b
recommend: rename our default recommend rule file to 50-tuned.conf
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-08-09 16:56:10 +02:00
Jaroslav Škarvada
0a2c210db3 Merge pull request #60 from olysonek/recommend.d_rebase
Recommend.d functionality
2017-08-09 16:08:44 +02:00
Ondřej Lysoněk
fde8e806a0 Implement recommend.d functionality
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>
2017-08-09 14:53:55 +02:00
Ondřej Lysoněk
cd655df597 Add 'tuned-adm profile_mode' command
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>
2017-08-03 15:24:17 +02:00
Ondřej Lysoněk
bc8ffcfb23 Introduce the concept of manually vs automatically set profile
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>
2017-08-03 15:23:54 +02:00
Ondřej Lysoněk
4e90f14941 bootloader: Accept only certain values for initrd_remove_dir
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>
2017-08-01 09:31:25 +02:00
Ondřej Lysoněk
b776b7420c disk: Fix traceback in dynamic tuning
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-24 16:42:28 +02:00
Jaroslav Škarvada
962bae3d71
realtime profiles: dropped tuna invocation from host/guest
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>
2017-07-19 18:35:17 +02:00
Jaroslav Škarvada
e1e662f040
network-latency: dropped spurious whitespace
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-07-19 18:05:45 +02:00
Jaroslav Škarvada
d1379afbec
cpu-partitioning: add cmdline, not redefine it
Related: rhbz#1451073

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-07-19 15:06:16 +02:00
Jaroslav Škarvada
643864f10c
network-latency: added skew_tick=1 kernel command line parameter
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>
2017-07-19 13:46:56 +02:00
Jaroslav Škarvada
5ba4b14b53 Merge pull request #57 from jonteague/patch-1
Update daemon.py
2017-07-14 16:15:12 +02:00
Jon Teague
0deef5666f Update daemon.py
Spelling error in log text
2017-07-14 15:06:30 +01:00
Jaroslav Škarvada
1b2f61c976 Merge pull request #56 from felixsch/remove-shebangs
Remove unnecessary shebang from gtk python modules.
2017-07-12 17:53:48 +02:00
Felix Schnizlein
6ffb226472 Remove unnecessary shebang from gtk python modules. 2017-07-12 17:29:59 +02:00
Jaroslav Škarvada
ffd26efd48
defirqaffinity: fix possible tracebacks
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-07-10 14:23:35 +02:00
Jaroslav Škarvada
ebf3132e58
defirqaffinity: fix coding style regarding tabs vs spaces
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-07-10 14:22:04 +02:00
Seeteena Thoufeek
0a01874fc5 Python traces are seen when tuned-adm verifiy -i is executed for cpu-partitioning profile.
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>
2017-07-10 14:20:30 +02:00
Ondřej Lysoněk
55c7128d1c modules: Fix a log message
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-10 10:36:51 +02:00
Ondřej Lysoněk
0b40ca1161 modules: Fix a comment in modules.conf
Fix syntax for forcing a module reload in a comment in modules.conf.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-10 10:21:55 +02:00
Jaroslav Škarvada
f498a0322e Merge pull request #55 from felixsch/fix-desktopfile-category
Change desktop menu category for tuned-gui from System to Settings;HardwareSettings
2017-07-07 20:07:07 +02:00
Felix Schnizlein
ab0797ae27 Change desktop menu category for tuned-gui
Change from not sufficient category 'System' to well known category
'Settings;HardwareSettings'.
2017-07-07 18:57:14 +02:00
Ondřej Lysoněk
8c55968fda Fix an inconsistency in a log message
Log the global config file name which will in fact be loaded,
not the default.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-07 10:09:05 +02:00
Jaroslav Škarvada
0484c6c258 Merge pull request #54 from olysonek/master
Mark a comment in recommend.conf
2017-07-04 16:00:00 +02:00
Ondřej Lysoněk
fed1e4d1f6 Mark a comment in recommend.conf
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-04 15:39:44 +02:00
Ondřej Lysoněk
e63a74266d plugin_video: Support the 'dpm' power method
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>
2017-07-04 15:18:19 +02:00
Jaroslav Škarvada
e143f76ccb Merge pull request #53 from olysonek/master
logs: Fix syntax error
2017-07-04 12:12:29 +02:00
Ondřej Lysoněk
90395d1a15 logs: Fix syntax error
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-07-04 10:57:33 +02:00
Jaroslav Škarvada
1c2ce2b607
logger: correctly remove all logging handlers
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-06-23 18:30:23 +02:00
Jaroslav Škarvada
5a2ea01f71
recommend: added support for matching of processes
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>
2017-06-15 17:59:58 +02:00
Jaroslav Škarvada
c315f6228c
realtime: fixed typos in cmdline add
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-06-14 16:46:02 +02:00
Jaroslav Škarvada
f068a031a8
bootloader: split string for removal from cmdline
Resolves: rhbz#1461279

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-06-14 16:41:07 +02:00
Luiz Capitulino
1ab378cc4a realtime-virtual-guest: re-assign kernel thread priorities
From 63e5ebfe0c71c5e6d0613c4d8327b2a6f3fba7ba Mon Sep 17 00:00:00 2001
From: Luiz Capitulino <lcapitulino@redhat.com>
Date: Fri, 19 May 2017 14:42:06 -0400
Subject:

The realtime guest profile uses the RT kernel default priority
assignment for the ksoftird, rcuc, and ktimersoftd kernel threads,
which is:

    17  FF   2  [rcuc/1] *
    19  FF   1  [ktimersoftd/1] *
    20  TS   -  [ksoftirqd/1] *

This doesn't allow running a PMD thread with fifo:1 in the
guest, since this will starve ktimersoftd and ksoftirqd if
those threads ever become runnable.

The solution is to use the same priority assigment we use
in the host where we've been running PMD threads with
fifo:1 priorities without problems. This assignment is:

   151  FF   4  [rcuc/15] *
   153  FF   3  [ktimersoftd/15] *
   154  FF   2  [ksoftirqd/15] *

This patch just copies the [scheduler] section from the
host profile.

Resolves: rhbz#1452357

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-05-29 17:40:02 +02:00
Jaroslav Škarvada
4483641602
realtime-virtual-host/guest: added suffix to cmdline
This is a workaround how to overcame the internal parser / merger limitation.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-05-29 17:34:42 +02:00
Luiz Capitulino
9bc020df37 realtime: use skew_tick=1 in kernel cmdline
By default the timer tick will fire at the same time on all
CPUs. This causes the jiffies_lock to get contended in the
real-time kernel, as it's a raw spinlock. skew_tick=1 causes
the timer tick to fire at different times on all CPUs,
fixing the contention.

Note skew_tick=1 usage is going to be propagated to the
NFV profiles as well.

Resolves: rhbz#1447938

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-05-29 17:30:17 +02:00
Luiz Capitulino
fdff5f15b9 realtime: drop unhelpful comment
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-05-29 17:30:15 +02:00
Luiz Capitulino
283a2b9aa2 nfv-host: inherit kernel cmdline from realtime profile
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-05-29 17:30:09 +02:00