This should create RPM packages for CI named e.g. tuned-2.15.0...
instead of tuned-v2.15.0... It may fix CI provisioning for
RHEL machines (https://github.com/packit/packit-service/issues/1095).
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Switch from the deprecated execution method.
Fix for the bz1798183-RFE-support-post-loaded-profile beakerlib test.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Previously, if there wasn't dmidecode all 'chassis_type' matches
were ignored. This is not correct, because we cannot enforce
chassis type. Now in such cases the chassis_type is matched
against empty string.
I.e. previously the following matched in case of no dmidecode:
something_that_matched
chassis_type=.*(Notebook|Laptop|Portable).*
Now it doesn't match, but the previous behavior can be still
emulated by e.g.:
something_that_matched
chassis_type=(.*(Notebook|Laptop|Portable).*)|^$
Resolves: rhbz#1959889
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The 'D' is now capital to clarify pronunciation.
DBus service name is kept as '/Tuned' not to break
backward compatibility.
This will also need update of downstream tests
which rely on the specific output strings containing
the name.
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
tuned(8) realtime-virtual-{host|guest} profiles set Kernel and
KVM module parameters via script.sh plugin. These parameters are
to be verified in a verify() function, invoked by tuned-adm verify
command.
This patch updates verify() functions to validate KVM module
parameters.
It moves kernel parameters to the tuned.conf file under the
[sysfs] & [sysctl] plugin sections. And removes call to
disable_ksm function, no longer required.
Fixes: RHBZ#1947858
Add and improve parameters error checking at the time of their
retrieval and setting respectively in _custom_parameters().
Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Commit 0ab1f8cc3f adds a check which replaces the channels mode parameters
based on the supported mode. With the older kernels, the un-supported mode
was indicated by 0, however recently that has been replaced by a string 'n/a'.
Due to this the check in plugin_net that verifies if a replacement is
required or not fails.
Fix the check to incorporate this new string that indicates the un-supported
mode.
Resolves: rhbz#1943291
Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
Although udev properties are sorted by libudev, according
to libudev/systemd upstream this behavior cannot be relied
upon. Sort them explicitly for consistent behavior.
Resolves: rhbz#1939970
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This allows the user to adjust the queue count for each
network device.
Also add check_net_queue_count built-in function.
The functions check if the user has specified any
queue count value or not. If no value is passed the function
returns the number of housekeeping CPUs as the queue count.
Resolves: rhbz#1846767
Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
plugin_net instances can now be given a new 'channels' option with
the following values (see ethtool(8) for their meaning):
rx N
tx N
other N
combined N
The syntax is the same as the syntax for 'rings', 'coalesce' and
other parameters introduced previously.
Example:
[net]
channels=combined 16
Since a network device either supports rx/tx or combined queue
mode. This patch automatically adjusts the parameters based on the
mode supported by the device as long as a valid configuration is
requested.
Resolves: rhbz#1846767
Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
The current 3600s wait() timeout in the controller's loop is too high.
There are known instances of signals not being acted upon. One known
example is SIGTERM not being acted upon during system shutdown.
Lowering the timeout to 10s allows for this signal to be acted upon right
after the timeout.
Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
After application of this patch in order to get rid of the duplicated
kernel command line options (which was duplicated due to the usage of
the grub2-mkconfig), the grub2-mkconfig needs to be run again.
We do not run it automatically in the spec file %post not to break
users not using grub2-mkconfig.
This fix expects that user has not modified the line containing the
GRUB_CMDLINE_LINUX_DEFAULT option and the $tuned_params in the
/etc/default/grub file. If user modified this line, the option
duplication may still occure. In such case, please remove the
$tuned_params from the /etc/default/grub by hand.
Resolves: rhbz#1777874
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
For perf events mmapped buffer is used. Under heavy load the buffer may
overflow. In such cases the `scheduler` plugin may start missing events
and not process some newly created processes. Increasing the buffer size
may help.
The buffer size can be set with the `perf_mmap_pages` parameter.
Value of this parameter has to be power of 2. If it is not the power of 2,
the nearest bigger power of 2 value is calculated from it and this
calculated value is used. If the `perf_mmap_pages` parameter is omitted,
the default kernel value is used, which should be 128 for the recent
kernels (tested on kernel-5.9.8).
Example:
[scheduler]
perf_mmap_pages = 256
Resolves: rhbz#1890219
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Scheduler plugin uses perf event loop to catch newly created processes.
By default it listens to perf.RECORD_COMM and perf.RECORD_EXIT events.
By setting `perf_process_fork` parameter to `true` it will also listen
to perf.RECORD_FORK events, i.e. it will explicitly process
child processes created by the fork system call. Usually, child processes
inherit affinity from their parents, thus the `scheduler` plugin doesn't
need to explicitly process them, that's why the `perf_process_fork`
parameter is by default set to `false` and child processes aren't
explicitly processed. This default setting may also save some CPU time.
Resolves: rhbz#1894610
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>