1
0
Fork 0
Commit graph

2154 commits

Author SHA1 Message Date
Jaroslav Škarvada
51caa84b2f
Merge pull request #792 from zacikpa/dirty-update
vm: Deprecate dirty_ratio in favour of dirty_bytes with %
2025-07-28 17:25:33 +02:00
Jaroslav Škarvada
864ac1fa35
Merge pull request #778 from yarda/udev-settle-set-udev-queue-size
udev-settle: obey udev buffer size and handle possible tracebacks
2025-07-25 21:58:49 +02:00
Jaroslav Škarvada
20e652fe16
Merge pull request #777 from inflatador/support_mmc
plugins: Support MMC devices
2025-07-25 21:55:01 +02:00
Jaroslav Škarvada
dbcd6204b1
Merge pull request #775 from zacikpa/packit-c10s
CI: build and test for c10s
2025-07-25 21:52:15 +02:00
Jaroslav Škarvada
0cc6f913e1
Merge pull request #770 from zacikpa/no-daemon-result
Re-raise daemon init exception in no-daemon mode
2025-07-25 21:50:15 +02:00
Jaroslav Škarvada
d76a89b0bd
Merge pull request #773 from yarda/spec-cleanup
spec: minor spec cleanup and enabled doc install on RHEL
2025-07-25 21:49:01 +02:00
Jaroslav Škarvada
bf81e7d072
Merge pull request #769 from zacikpa/scsi-fix
scsi: Do not set ALPM on external SATA ports
2025-07-25 21:12:00 +02:00
Jaroslav Škarvada
b38f56efc2
Merge pull request #760 from zacikpa/prepend-variables
variables: Add an option to prepend child variables before parent ones
2025-07-25 21:06:24 +02:00
Jaroslav Škarvada
4be7c5e9d2
Merge pull request #767 from zacikpa/realtime-pstate
realtime: Disable appropriate P-State drivers
2025-07-24 01:19:38 +02:00
Jaroslav Škarvada
dbcd53662c
Merge pull request #761 from yarda/perf-optional-fix
perf: dropped from irqbalance and improved detection in scheduler
2025-07-24 01:05:46 +02:00
Jaroslav Škarvada
e3ddece936
Merge pull request #755 from mrhpearson/fix_thinkpad_fn_keys
Fix thinkpad_function_keys feature
2025-07-24 00:49:23 +02:00
Jaroslav Škarvada
6c91cd75b8
Merge branch 'master' into fix_thinkpad_fn_keys 2025-07-24 00:33:58 +02:00
Jaroslav Škarvada
c3cab598c0
Merge pull request #757 from ferdnyc/patch-1
GUI: Fix the profile deleter script
2025-07-24 00:24:18 +02:00
Jaroslav Škarvada
04130d1a7c
Merge pull request #753 from msizanoen1/fix-inotify-param-swap
tuned-ppd: Fix inotify watch for performance degradation
2025-07-24 00:20:01 +02:00
Jaroslav Škarvada
b44d6f3cfc
Merge pull request #748 from zacikpa/calc-isolated-cores-ranges
functions: Make calc_isolated_cores return CPU ranges
2025-07-24 00:16:49 +02:00
Pavol Žáčik
f64fac7530
functions: Make calc_isolated_cores return CPU ranges
This makes the function output shorter which is desirable
with many CPUs when the function is used, e.g., to compute
the content of the isolcpus kernel argument.

Resolves: RHEL-75751
2025-07-23 17:30:30 +02:00
Jaroslav Škarvada
eb152e28e8
Merge pull request #747 from zacikpa/RHEL-61801
network_latency: Set non-zero rcutree.nohz_full_patience_delay
2025-07-23 09:33:15 +02:00
Jaroslav Škarvada
8d6479c276
Merge pull request #745 from retrixe/fix/sata-lpm-med_power_with_dipm
profiles: use `med_power_with_dipm` for SATA ALPM
2025-07-23 09:20:43 +02:00
Jaroslav Škarvada
b208ff4d5d
Merge pull request #690 from zacikpa/rpm-ostree-fix
bootloader: Simplify tuning of rpm-ostree kargs
2025-07-23 08:54:38 +02:00
Jaroslav Škarvada
f64c5d1198
Merge pull request #756 from zacikpa/RHEL-79943
functions: Silence errors if module kvm_intel does not exist
2025-07-14 07:28:14 +02:00
Pavol Žáčik
096c402881
vm: Deprecate dirty_ratio in favour of dirty_bytes with %
Same for dirty_background_ratio and dirty_background_bytes.

Using both the ratio and the bytes is not compatible with
the current profile inheritance implementation, because it
is not possible for dirty_bytes in a child profile to override
dirty_ratio in its parent profile.

Resolves: RHEL-101578
2025-07-08 15:58:59 +02:00
Myrrh Periwinkle
3ed2de590a tuned-ppd: Pin virtual files in memory for inotify
The inodes backing the kernfs virtual files for the attributes we watch
may be dropped by the kernel due to memory exhaustion or explicit user
action (sysctl vm.drop_caches). This causes inotify events to not be
delivered as kernfs_notify() simply drops the event if the inode cannot
be found in the kernel caches.

Fix this by explicitly pinning the attributes virtual files in memory to
ensure we receive inotify events.
2025-06-18 23:00:58 +07:00
Myrrh Periwinkle
d5ee54cf83 tuned-ppd: Fix indentation 2025-06-18 23:00:58 +07:00
Myrrh Periwinkle
2584ea9e31 tuned-ppd: Fix inotify watch for performance degradation
Ensure the parameters for PerformanceDegradedEventHandler are passed in
the correct order.
2025-06-18 23:00:58 +07:00
Pavol Žáčik
3e05cb783e
bootloader: Remove previously appended rpm-ostree kargs
If TuneD-appended kargs are present and do not match
the kargs to be appended, we should remove them. This
can happen if there was no profile rollback, e.g.,
when using the no-daemon mode.

Resolves: RHEL-86814
2025-05-22 15:13:45 +02:00
Pavol Žáčik
91cb383ad7
bootloader: Simplify tuning of rpm-ostree kargs
The bootloader plugin claims that it does not mess
with existing kernel parameters; make sure we adhere
to that also for rpm-ostree systems:

1. Only append a new karg if the same key=value pair
does not already appear in kernel parameters. If we would
duplicate it, it would not be possible to determine which
one to delete when unapplying the profile.

2. Do not delete existing key=value pairs when the profile
adds a karg with another value for the key. A single key can
appear multiple times in the kernel parameter list with different
values.

Also make sure new kargs are added exactly in the order in which
they appear in the profile. This is especially important for kargs
related to hugepages.

Resolves: RHEL-45836
2025-05-22 15:13:41 +02:00
Jaroslav Škarvada
d88f53a226
udev-settle: obey udev buffer size and handle possible tracebacks
It now uses TuneD udev events buffer size which is by default 1 MB
instead of the 8 kB default udev buffer size. The buffer size is
configurable in the tuned-main.conf. This should prevent filling
of the buffer even in case of a storm of udev events. It also
contains workaround for the pyudev bug:
https://github.com/pyudev/pyudev/issues/194

Even if the buffer is filled now, the udev queue is no more stuck
and error is logged.

Resolves: RHEL-92637

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-05-21 09:29:41 +02:00
Jaroslav Škarvada
1c746a35a2
Merge pull request #766 from zacikpa/ncat-fix
beakerlib: Use ncat explicitly instead of nc
2025-05-21 09:18:33 +02:00
Private User
9684801f52 plugins: Support MMC devices
Add support for MMC (MultiMediaCard) devices in tuned's
disk plugin.

fixes: #776

Signed-off-by: Brian King <1854985+inflatador@users.noreply.github.com>
2025-05-17 17:00:49 -05:00
Pavol Žáčik
77bd86ee3a
CI: build and test for c10s 2025-05-16 11:20:59 +02:00
Jaroslav Škarvada
b924ccdc75
Merge pull request #772 from RHEmployee/fix-tests-new-lib-api
tests/beakerlib: remove old API call.
2025-05-14 12:35:04 +02:00
Robin Hack
09650925b3 tests/beakerlib: remove old API call.
Library API has been changed downstream and we need
to reflect those changes in upstream.
2025-05-14 05:54:51 -04:00
Jaroslav Škarvada
c66fefbddc
spec: minor spec cleanup and enabled doc install on RHEL
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-05-08 00:12:01 +02:00
Jaroslav Škarvada
f828dcf702
Merge pull request #771 from yarda/udev-settle
tuned-main.conf: added startup_udev_settle_wait option
2025-05-07 22:51:59 +02:00
Jaroslav Škarvada
7d061ab06d
tuned-main.conf: added startup_udev_settle_wait option
Timeout in seconds to maximally wait until udev settles. If set to value
bigger than 0, it will either wait until udev settles or the timeout
occurs. Disable with 0.

Resolves: RHEL-88238

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-05-07 12:45:01 +02:00
Jaroslav Škarvada
4ce3e0bc49
consts: fixed whitespaces
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-05-07 02:20:06 +02:00
Pavol Žáčik
5b72dea0d3
Re-raise daemon init exception in no-daemon mode
This way, the exception gets caught in tuned.py,
which prints an error message and exits with
non-zero error code, providing feedback to
tuned-adm. Previously, tuned-adm would have no
way of knowing that TuneD failed.

Resolves: RHEL-71304
2025-05-06 19:42:17 +02:00
Pavol Žáčik
0685e9e523
scsi: Do not set ALPM on external SATA ports
Tuning ALPM for external SATA ports is incompatible
with reliable detection of hot plug removals (see
SATA AHCI 1.3.1, section 7.3.1). This commit skips
the ALPM setting for such ports, i.e., for all ports
that have either the ESP bit (External SATA Port)
or the HPCP bit (Hot Plug Capable Port) set to 1
in the PxCMD register (exposed in `ahci_port_cmd`).

Resolves: RHEL-79913
2025-05-02 13:47:58 +02:00
Jaroslav Škarvada
9392599b76
Merge pull request #763 from yarda/udev-remove-race-fix
hotplug: fixed device remove race condition
2025-04-28 11:38:49 +02:00
Pavol Žáčik
1ba98b652e
realtime: Disable appropriate P-State drivers
I.e., intel_pstate, amd_pstate or none.

Resolves: RHEL-85637
2025-04-16 15:09:10 +02:00
Pavol Žáčik
8f1c757c87
beakerlib: Use ncat explicitly instead of nc
This is to make sure that we do not use netcat,
which does not work in the unix socket test.
2025-04-15 16:18:18 +02:00
Jaroslav Škarvada
7373cecf3b
hotplug: fixed device remove race condition
During profile loading if the device is assigned to the instance but it
isn't processed yet by the main thread and the remove event fires, TuneD
may try to remove the device from the free list, because it wrongly assumes
that the device is unassigned. With this workaround it shouldn't traceback
in such cases, but there may be still some errors when it tries to tune the
removed device in the main thread. We currently cannot do much about it.

The add/rename udev events should be mostly safe, because there are two
threads - the main thread and the udev callback thread. The udev
callback thread is processing udev events sequentially one by one and it
shouldn't break the main thread data when processing the add/rename
events. It would be better to have one worker thread for it, but it
would require quite a big redesign.

Also the cleanup phase was improved, because now it firstly unsubscribes
the udev events and then it continues with the cleanup which should
minimise problems of udev events firing during the profile unload.

Resolves: RHEL-83827

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-04-02 02:43:22 +02:00
Jaroslav Škarvada
d04adc42ee
perf: dropped from irqbalance and improved detection in scheduler
Now the irqbalance plugin will work even if perf is unavailable. Also
improved perf detection in the scheduler plugin. If the perf.cpu_map()
fails for some reason, perf is disabled and the perf library will not
segfault.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2025-03-26 18:25:17 +01:00
Pavol Žáčik
7e5187e1b2
variables: Add an option to prepend child variables before parent ones
This enables child profiles to use new variables in the definitions
of variables that they overwrite in parent profiles.

Also allow multiple instances of variable units, with the same
rules as plugins have.

Resolves #751.
2025-03-19 16:51:15 +01:00
Mark Pearson
bd5f285049 ppd: Enable sysfs_acpi_monitor by default
If the platform profile is changed outside of tuned then the update
does not get reflected in tuned-adm and gnome-settings.
This is particularly noticeable on Thinkpads where the F8 Mode key
changes the profile but the change is not reflected. It can also be
demonstrated by changing the profile from the command line.

Enable the feature by default. It works well and is useful.

Tested on multiple Thinkpads, but I expect it to be useful to other
vendor platforms too.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
2025-03-10 15:18:52 -04:00
Frank Dana
c82101f03a
GUI: Fix the profile deleter script
Instead of hardcoding a path, use 
`tuned.consts.USER_PROFILES_DIR` as the location
where we should expect to find profile directories
that we've been asked to delete.
2025-03-07 18:32:15 -05:00
Pavol Žáčik
c9f678d8a1
functions: Silence errors if module kvm_intel does not exist
Without the redirect to /dev/null, an error message would
be reported in TuneD logs on aarch64 machines, which do not
have the kernel module.

Resolves: RHEL-79943
2025-03-04 10:06:47 +01:00
Mark Pearson
dbd7fd0a0d ppd: Rename thinkpad_function_keys as sysfs_acpi_monitor
The thinkpad_function_keys feature really doesn't have anything to
do with Thinkpad function keys. It is just monitoring for sysfs events
from firmware/acpi/platform_profile

Rename the feature to be more accurate. It is useful to other platforms
than Thinkpads :)

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
2025-02-28 14:04:48 -05:00
Pavol Žáčik
630a3ccf1a
network_latency: Set non-zero rcutree.nohz_full_patience_delay
Resolves: RHEL-61801
2025-02-11 11:19:34 +01:00
Ibrahim Ansari
d2adada5aa
profiles: use med_power_with_dipm for SATA ALPM
Using `min_power` can lead to data loss, and `med_power_with_dipm`
delivers similar power savings without the chance of data loss. [1]

`med_power_with_dipm` is the default setting[2] in upstream Linux for
SATA Link Power Management, and should provide significant power
savings on laptops using SATA drives over `medium_power`.

[1] https://hansdegoede.livejournal.com/18412.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/ata/Kconfig?id=5433f0e7427ae4f5b128d89ec16ccaafc9fef5ee

Signed-off-by: Ibrahim Ansari <ansari.ibrahim1@gmail.com>
2025-02-04 13:13:08 +05:30