Now it supports the following extended syntax:
parent profile:
[bootloader]
cmdline=opt1 opt2
child profile:
[bootloader]
cmdline1=+opt3
cmdline2=opt4
cmdline3=-opt2
Resulting cmdline:
opt1 opt3 opt4
It recognizes "cmdline*" and postprocess it to extend the inheritance.
It recognizes '+' and '-' on the very beginning of the option and adds
or removes the string from the command line. When using
'+' or '-' it takes the string after the sign till end of the line. To
add option starting with e.g. '+' you need to use '++opt'. If '+' is
omitted in succesive command lines, it's taken implicitly (e.g. opt4).
If you need to replace the whole command line in child profile, use:
[bootloader]
replace=true
cmdline=opt1 opt2
This will drop all 'cmdline*' setting from the parent profile(s).
Resolves: rhbz#1274464
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Otherwise, a process running on isolated CPUs will be
interrupted by timers or unwanted VM exists.
Resolves: rhbz#1395855
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit introduces functions to create and delete the
kvm modprobe file used by the realtime profiles.
This is needed because the cpu-partitioning profile wants
the same modprobe file for kvm.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
As the cpu-partitioning profile does not use isolcpus=,
the kernel can end up creating long living timers on
nohz_full CPUs during early boot. Those timers will
fire later, causing jitter.
However, recent Linux kernel will always try to migrate
unpinned timers away from nohz_full CPUs when timer
migration is enabled which is what we want.
NOTE: Older kernels would migrate unpinned timers from
idle CPUs to busy CPUs without regard if the
CPU is nohz_full. This would certainly cause
trouble to applications that takes 100% of the
CPU in user-space (eg. DPDK). So, enabling
timer migration is only safe on recent kernels.
Resolves: rhbz#1408308
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
The profile is delivered in the new tuned-profiles-cpu-partitioning subpackage.
Also moved defirqaffinity.py to the base package to allow other profiles
to use it.
Resolves: rhbz#1359956
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
GNOME Shell doesn't seem to run applications through the shell or with some
persistent parent, thus pkexec cannot be execed over the original tuned-gui
process, because it wouldn't pass the pkexec getppid check. The check is
there to ensure that the pkexec will not be owned by the init process.
This fix runs the pkexec as a child process. The minor drawback is that
there will be two tuned-gui processes - the original process running under
the user and the pkexeced process running under the root. The original
process will effectively do nothing, it will just wait for the pkexeced
process to exit.
Resolves: rhbz#1377896
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
If profile was quickly changed, e.g. profile loading failed and
previous profile was reloaded, multiple profile_changed DBus signals
could be received. If the signal is received before it is processed
deadlock may occure (i.e. 10 minut timeout).
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Kernel uses 'transparent_hugepage', but Tuned has been so far using
'transparent_hugepages', which was confusing. The new Tuned alias is
meant to improve the situation, so Tuned users can now use both variants.
It's possible that Tuned will drop 'transparent_hugepages' sometimes
in the future.
Resolves: rhbz#1249610
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This can be globally controlled by the 'reapply_sysctl' setting in
tuned-main.conf. If enabled, system systcls (/etc/sysctl.conf,
/etc/sysctl.d, ...) are reapplied after Tuned sysctls are applied,
i.e. Tuned sysctls don't override system sysctls. It's load
system sysctl by executing 'sysctl --system'. It's now by default
enabled.
Resolves: rhbz#1302953
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
In no_daemon mode it doesn't try to query DBus, so it doesn't
output DBus error.
Resolves: rhbz#1351536
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It seems that some drivers return udev names with embedded slashes '/', e.g.:
sfdsk/gdssys34
When kernel creates sysfs nodes for them it replaces '/' by '!' not to cause
ambiguity in path, i.e. the device from previous example will become:
sfdsk!gdssys34
This commit add support for such cases. It checks whether there is embedded
'/' in the device name, if yes, it tries to construct sysfs path with '!'.
It checks whether the resulting sysfs path exists, if not, it tries the
version with embedded '/'. This is safety fallback not to cause regression
in some weird cases and it may be dropped in the future.
Related: rhbz#1353142
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This plugin can set parameters to kernel modules. It generates
/etc/modprobe.d/tuned.conf file.
Usage:
[modules]
MODULE=OPTION1=VALUE1 OPTION2=VALUE2...
E.g:
[modules]
netrom=nr_ndevs=2
This sets module 'netrom' to have 'nr_ndevs' option set to '2'. The module
can be also forced to load/reload by using special '+r' prefix, e.g.:
[modules]
netrom=+r nr_ndevs=2
Will also cause Tuned to try to remove 'netrom' module (if loaded) and
try to (re)insert it with the specified parameters. The '+r' can be followed
by an optional comma (','), i.e.:
'+r,' for better readability.
By using '+r' the module will be loaded even if not needed.
Resolves: rhbz#1249618
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The sampling rate determines how frequently the governor checks to tune the
CPU. The sampling_down_factor is a tunable that multiplies the sampling rate
when the CPU is at its highest clock frequency thereby delaying load
evaluation and improving performance. Allowed values for
sampling_down_factor are 1 to 100000.
Usage:
[cpu]
sampling_down_factor = 1
Recommended setting for jitter reduction:
sampling_down_factor = 100
Original idea of adding support for this knob to Tuned came from
Akshay Adiga <akshay.adiga@linux.vnet.ibm.com>
This patch also removes cpupower support from Tuned. It seems
that cpupower tool changes it's output format time to time, and parsing
it in Tuned becomes harder and harder. Morever the current parser in Tuned
didn't handle the recent cpupower correctly. It's much easier to just query
sysfs than supporting multiple versions of cpupower.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This function takes three arguments:
etxt - the text to be logged if the assertion fails
var1 - first variable to compare
var2 - seconf variable to compare
The function compares 'var1' and' var2', if they don't match
it logs 'etxt' and raises exception which will abort profile
loading.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This function filters the input cpulist against CPUs present on the
system. It returns unpacked list.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>