This doesn't have effect on kernels build with CONFIG_RCU_NOCB_CPU_ALL=y.
Resolves: rhbz#1334479
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
If there is problem with polkit, it tries to get the UID of the
sender process and in case it's root authorize the request.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Dropped dbus at_console policy and implemented polkit authorization.
By the default policy the query actions are allowed for all users, actions
which do modification to the system settings or Tuned state are by default
allowed only for active users that have console, others need admin
authorization.
Resolves: rhbz#1095142
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The glib/dbus doesn't like multithreading which is not handled
by them, thus the code may segfault. According to
https://bugzilla.redhat.com/show_bug.cgi?id=1330127#c2
it is not supportd and dbus-glib/dbus-python are not thread safe.
This commit moves multithreading under glib and handles all
in the glib mainloop, thus it may no longer segfaults.
It also adds --timeout, -t command line parameter which may
specify timeout for the sync operations, e.g.:
# tuned-adm --timeout 200 profile balanced
wil use 200 seconds timeout when waiting for the profile to
load.
The default timeout was increased to 90 seconds to match
systemd default timeouts.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The verify command can now be run in ignore-missing mode. In this mode
missing/non-supported settings (i.e. those which current value is None)
are ignored and not treated as errors.
The tuned-adm got new verify options -i and --ignore-missing which
enables the ignore-missing mode, usage:
tuned-adm verify -i
or:
tuned-adm verify --ignore-missing
The DBus interface got new method 'verify_profile_ignore_missing' which
does the verification in ignore-missing mode.
Resolves: rhbz#1243807
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
By default tuned-adm now synchronously switch profiles, i.e it waits untill
the profile is applied and then returns to the shell. It returns with
exitcode 0 if profile is correctly applied. If there is an error it uses
exitcode > 0 (currently only 1 is used) and displays error. For reverting
to old behaviour (i.e. asynchronous profile switching) when the tuned-adm
returns immediately there is an tuned-adm command line option -a (or --async).
D-Bus API was extended to allow synchronous profile switching. Now the
"profile_changed" D-Bus signal is sent when the profile is applied. The
signal contains the following data:
profile_name:string - the name of the profile which was applied
result:boolean - status of the operation, true if OK, false on error
errstr:string - string containing description of the error (if result is
false)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It was found during code review that the kernel always try to
migrate timers away from idle CPUs to busy CPUs. Real-time
CPUs running dpdk polling threads for example, are busy so
they are a great candidate to receive timers from idle CPUs
(see get_nohz_timer_target() in the kernel sources).
It is not clear how this problem can affect real-time
applications and KVM-RT. However, for real-time and
high-performance the best thing is for a timer to always
fire in the CPU where it was created.
Resolves: rhbz#1323283
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
We create the /etc/modprobe.d/kvm.rt.tuned.conf file at
every boot. However, there's nothing that guarantees that
the kvm module will be loaded after tuned. Indeed, it's
possible to reproduce a race where the kvm module is loaded
before tuned. When this happens, the kvm module will be
loaded with incorrect parameters as the kvm.rt.tuned.conf
file doesn't exist.
The solution to this problem is to create the kvm.rt.tuned.conf
file only if it doesn't exist and delete it when changing
profiles.
Resolves: rhbz#1292117
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
profiles/realtime-virtual-host/script.sh | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
Upon stop action the script is called the following way:
script.sh stop [$HINT]
$HINT is not used if the stop is result of tuned
shutdown. $HINT is set to "profile_switch" if the stop is
result of profile switch.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Added new tuned-adm functionality 'profile_info'. It has optional parameter
'profile_name'. If called without parameter, active profile is used.
It outputs name of the profile it is querying, profile summary, and profile
description. If there is no profile summary or description available it
outputs empty string(s).
Extended tuned-adm 'list' functionality. It now displays profile summary
in the list (if available).
Added summary to profiles.
Extended D-Bus API to support the new feature and for better Cockpit support:
- Added 'profile_info' method. It gets profile_name argument and it queries
the requested profile for information. If profile_name is empty string it
queries the active/selected profile. It returns tuple of the following
format (status, profile_name, summary, description), where status is
boolean. If it is False, the query mechanism failed and the other fields
don't contain valid data
- Added 'profiles2' method. It's extension of 'profiles' method. It returns
list of tuples. Tuples have following format:
(profile_name, profile_summary)
Related: rhbz#1228356
Fixes: #46
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
In case sysctl option doesn't exist (e.g. is unsupported on the
system), the verification now passes.
Related: rhbz#1252153
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The bootloader plugin adds there GRUB_CMDLINE_LINUX_DEFAULT tuned setting
which should be removed upon Tuned uninstallation. This commit fixes
the regex used in %postun to correctly remove the Tuned footprint from
there.
Resolves: rhbz#1268845
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The latest RHEL and RT kernels got support for setting the cpumask of unbound
workqueues in sysfs (https://bugzilla.redhat.com/show_bug.cgi?id=1176155).
This patch sets the unbound workqueues cpumask to the list of non-isolated
cores for the real-time profiles.
Patch from Luiz Capitulino <lcapitulino@redhat.com>
Resolves: rhbz#1259043
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
If the result of lapic-tsc-deadline kvm-unit-test continues
to decrease as ns increases, then use highest ns value.
Reported and tested by Luiz and Hai.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Resolves: rhbz#1267284
This plugin handles SCSI hosts. On Linux these are also used for SATA.
Currently it only supports ALPM setting, e.g.:
[scsi_host]
devices=host0
alpm=medium_power
ALPM is set per SATA/SCSI host. If SCSI host doesn't support ALPM
(it is SATA/AHCI specific), it is skipped and message is logged into
Tuned log with 'info' loglevel.
Concurrently the ALPM settings were removed from the 'disk' plugin.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
E.g.:
$ cat /sys/block/sda/queue/scheduler
noop [deadline] cfq
The 'save_sys' function needs to save 'deadline', not 'noop [deadline] cfq'.
Resolves: rhbz#1251507
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
There is no need to save and restore intel pstate attributes which aren't
changed by tuned profile.
Resolves: rhbz#1252156
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Unquoting first and last quotation mark in value, i.e. converting:
OPTION="VALUE" to OPTION=VALUE
Also added unquoting to profile verification, unquoting both
(current and requested) values.
Resolves: rhbz#1254538
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It needs to use unique ',ANYSTRING' suffix, everything after the last ','
will be stripped by the parser, e.g.:
[balanced,1]
/FILE1=RE1
[balanced,2]
/FILE2=RE2
This will set 'balanced' profile in case there is FILE1 matching RE1 or
FILE2 matching RE2 or both. There is no need to use the suffix
if the profile is specified only once.
Also improved description in the recommend.conf.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>