1
0
Fork 0
Commit graph

746 commits

Author SHA1 Message Date
Jaroslav Škarvada
e9a352e16f Merge pull request #9 from olysonek/plugin_scsi_host
plugin_scsi_host: Mark _device_is_supported as a classmethod
2017-02-13 22:11:04 +01:00
Jaroslav Škarvada
df5a43ee36 Merge pull request #8 from olysonek/_device_is_supported
plugin_disk: Mark _device_is_supported as a classmethod
2017-02-13 22:09:59 +01:00
Jaroslav Škarvada
c256075c82 Merge pull request #7 from olysonek/readahead_multiply
plugin_disk: Fix setting 'readahead_multiply'
2017-02-13 22:04:02 +01:00
Ondřej Lysoněk
571910e750 plugin_scsi_host: Mark _device_is_supported as a classmethod
This fixes a pylint error.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-02-13 17:44:34 +01:00
Ondřej Lysoněk
ad6d18bb62 plugin_disk: Mark _device_is_supported as a classmethod
This fixes a pylint error.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-02-13 17:36:10 +01:00
Ondřej Lysoněk
1d8b0bb794 plugin_disk: Fix setting 'readahead_multiply'
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>
2017-02-13 17:24:40 +01:00
Jaroslav Škarvada
66d550b94d bootloader: improved inheritance
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>
2017-02-08 12:19:35 +01:00
Jaroslav Škarvada
e57df645ad man: report bugs pointed to Red Hat bugzilla
Added diacritic marks to contributor names where appropriate to show
correct credit.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-02-08 12:16:11 +01:00
Jaroslav Škarvada
b088337d3d spec: muted error if there is no selinux support
Resolves: rhbz#1404214

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-01-25 09:55:57 +01:00
Jaroslav Škarvada
82e41184ed Added missing modules.conf
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-01-11 15:45:23 +01:00
Luiz Capitulino
efd686427c cpu-partitioning: disable kvmclock sync and ple
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>
2017-01-10 13:56:56 +01:00
Luiz Capitulino
e25fcb3164 realtime-virtual-host: use kvm modprobe helpers
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-01-10 13:50:03 +01:00
Luiz Capitulino
e153bf3ba1 profiles/functions: introduce kvm modprobe file helpers
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>
2017-01-10 13:47:50 +01:00
Luiz Capitulino
11686d59fe cpu-partitioning: enable timer migration
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>
2017-01-10 13:44:28 +01:00
Jaroslav Škarvada
0ce452fc2e functions: used sysfs for governor switching by default
Patching of cpuspeed kept for backward compatibility.

Related: rhbz#1313489

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-11-29 16:51:37 +01:00
Jaroslav Škarvada
8b2249bd13 Moved project git to GitHub
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-11-10 15:10:11 +01:00
Jaroslav Škarvada
7e3a4fd791 Makefile: added fallback if RPM macros for systemd are missing
Resolves: https://bugs.gentoo.org/show_bug.cgi?id=563396

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-11-03 14:46:35 +01:00
Jaroslav Škarvada
906b911455 tuned-adm: fixed traceback if non-existent profile is queried through profile_info
Resolves: rhbz#1385145

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-10-17 16:13:56 +02:00
Jaroslav Škarvada
bac41784a3 cpu-partitioning: removed spurious whitespace
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-10-07 12:29:37 +02:00
Jaroslav Škarvada
ace1ee1fe4 nfv: fixed quoting in manual page
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-10-07 12:01:40 +02:00
Jaroslav Škarvada
db6947da2f profiles: added new profile cpu-partitioning
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>
2016-10-07 11:56:57 +02:00
Jaroslav Škarvada
bfc6214888 plugins: added systemd plugin
This plugin allows setting CPUAffinity in /etc/systemd/system.conf.

Related: rhbz#1359956

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-10-06 16:49:42 +02:00
Jaroslav Škarvada
325dd17ee5 tuned-gui: fixed pkexec to work from GNOME Shell
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>
2016-09-21 16:43:39 +02:00
Jaroslav Škarvada
a3c3471755 plugin_sysctl: do not hardcode path to sysctl
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-09-20 13:12:28 +02:00
Jaroslav Škarvada
7c151cef36 defirqaffinity: fixed exit on wrong place
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-09-01 13:17:24 +02:00
Jaroslav Škarvada
f8653592e1 defirqaffinity: fixed traceback due to syntax error
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-09-01 13:03:36 +02:00
Jaroslav Škarvada
c8ac54d988 tuned-adm: fixed race condition in profile_changed DBus signal processing
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>
2016-08-29 15:25:40 +02:00
Jaroslav Škarvada
8121ea9166 tuned-adm: do not timeout if non-existent profile is requested
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-08-23 16:55:29 +02:00
Jaroslav Škarvada
bbfc2c6e54 Dropped deprecated/unneeded glib code
Resolves: rhbz#1369044

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-08-23 15:41:52 +02:00
Jaroslav Škarvada
83d573727b gui: fixed traceback when attempting to start tuned
Another forgotten DBus paths copy&paste error

Related: rhbz#1356369

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-08-09 16:03:35 +02:00
Jaroslav Škarvada
4f360200d3 new release (2.7.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-08-02 14:35:19 +02:00
Jaroslav Škarvada
1f365e4f36 tuned-adm: fixed profile_info traceback
Resolves: rhbz#1362481

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-08-02 14:16:38 +02:00
Jaroslav Škarvada
e6b647641b tuned-adm: fixed traceback of 'tuned-adm list' if daemon is not running
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-21 16:34:29 +02:00
Jaroslav Škarvada
e6c6e15733 gui: fixed traceback caused by DBus paths copy&paste error
Related: rhbz#1356369

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-21 11:08:20 +02:00
Jaroslav Škarvada
3c15b749c7 spec: minor changelog cleanup
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-19 15:30:13 +02:00
Jaroslav Škarvada
99505cf781 new release (2.7.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-19 14:20:45 +02:00
Jaroslav Škarvada
cf8f326c44 plugin_vm: introduced transparent_hugepage alias to transparent_hugepages
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>
2016-07-18 16:23:21 +02:00
Jaroslav Škarvada
d1986f20f9 plugin_sysctl: reapply system sysctl after Tuned sysctl are applied
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>
2016-07-18 16:00:15 +02:00
Jaroslav Škarvada
98c9a1f537 plugin_mounts: not hardcoded lsblk path, it may differ accross distros
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-15 15:56:36 +02:00
Yixun Lan
e675ab0b4c pygobject: fix import Gtk without specify version error
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2016-07-15 15:49:25 +02:00
Jaroslav Škarvada
e9c8815c0e tuned-adm: simplified no_deamon check regarding DBus
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-14 18:09:46 +02:00
Jaroslav Škarvada
b70a93dd8a tuned-adm: fixed detection of no_daemon mode
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>
2016-07-14 17:39:29 +02:00
Jaroslav Škarvada
209bd3291c tuned: fixed profile switching in no_daemon mode
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-14 17:31:02 +02:00
Jaroslav Škarvada
5b9cf627f1 sap-hana: explicitly setting kernel.numa_balancing = 0 for better performance
Resolves: rhbz#1355768

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-12 16:49:10 +02:00
Jaroslav Škarvada
fd40ca7c67 plugin_disk: try to workaround embedded '/' in device names
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>
2016-07-12 11:57:11 +02:00
Jaroslav Škarvada
1d57d7229b plugin_base: correctly strip assignment modifiers even if not used
Resolves: rhbz#1353142

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-08 15:58:30 +02:00
Jaroslav Škarvada
6793c2abff plugins: added modules plugin
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>
2016-07-04 19:03:51 +02:00
Jaroslav Škarvada
ddeadd34eb spec: fixed conditional support for grub2 to work with selinux
Resolves: rhbz#1351937

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-07-01 19:01:30 +02:00
Jaroslav Škarvada
6bf3afa9d3 plugin_cpu: added support for sampling_down_factor and removed cpupower
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>
2016-06-23 11:24:41 +02:00
Jaroslav Škarvada
b85e9c2180 realtime: changed assertion text to be more clear
Related: rhbz#1264128

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-06-17 14:16:57 +02:00