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>
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>
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>
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>
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>