Provide the correct number of parameters to the '_set_readahead' method.
This fixes a traceback when setting the 'readahead_multiply' option.
I assume the 'sim' parameter to '_set_readahead' means 'simulated' (it
is handled in that sense), so we should set the value to False, because
we are actually enabling/disabling the tunning here.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
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>