Parsing ethtool output has been broken for several years, since `ethtool -c`
started producing a line resembling `CQE mode RX: n/a TX: n/a`.
This prevents setting any [net] coalesce= options, which log
`tuned.plugins.plugin_net: unknown coalesce parameter(s): {'CQE mode RX'}`.
Substituting `cqe-mode-rx:` for `CQE mode RX:` resolves the issue,
although there is a conflict with the `adaptive-tx` workaround
which prevents us from supporting `cqe-mode-tx` directly.
Do not attempt to address that issue as part of this change.
Fixes#726.
Signed-off-by: Ryan Zoeller <ryan.zoeller@aliaro.com>
This will not completely resolve RHEL-60906, because there will be
always race condition if the rename event happens before the instance
is fully initialized, but it should significantly improve the situation.
Drawback is that it can report in the logs device names that shouldn't
be matched by the plugin_net instance, i.e. it matches devices according
to their original names but accesses them with their new names. This
can be confusing. Also in the runtime API (e.g. for removal of the
device from the instance), the original device names have to be used.
For insertion of the device to the instance, new names have to be used.
This can be even more confusing.
Unfortunately, there probably isn't better alternative now, because
for correct operation we would have to handle rename by removal and
addition events. This would require rollback and retune steps which would
lead to very negative performance consequences. Also we would have to
cope with partially tuned devices if the rename event happens during
profile application. It's doable, but it would require big
architectural changes.
The PR also extends internal API, now the plugin instances receive
'instance' as a method parameter.
Also fixed some existing CodeQL warnings.
Resolves: RHEL-60906
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
It may happen that a process gets moved into a blacklisted cgroup
when TuneD is already applying a profile. Postpone the filtering of
processes according to the blacklist to the last possible moment to
minimize the race window.
When setting process affinity fails, re-check whether the process
belongs to a blacklisted cgroup once again and do not report an
error if that's the case.
Resolves: RHEL-72981
Add a check which raises an error if the caller of ReleaseProfile
is not identical to the caller of HoldProfile.
Do not number cookies from 0, use pseudo-random integers.
Do not allow null cookies, which may cause issues in clients.
E.g., in gnome-settings-daemon, a null cookie means that it
currently has no active hold.
Rename HoldProfile/ReleaseProfile polkit actions to
hold-profile/release-profile.
Add the switch-profile action and check against it when
switching the profile using the ActiveProfile DBus property.
The changes require some refactoring of the DBusExporter class,
mainly because we need to be able to supply a custom polkit action
name instead of deriving it from the DBus method name.
The signal is received even when the profile change originates within
tuned-ppd. We cannot reliably detect that is the case, so do not
clear profile holds if the signalled profile corresponds to the
currently active one.
If there are multiple profile switches coming closely after
each other, all signals excepts the last one (with the current
TuneD profile) are not relevant anymore and should be ignored.
Set an Obsoletes: tag to remove power-profiles-daemon package.
Resolves: #2293628
Signed-off-by: Kate Hsuan <hpa@redhat.com>
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
sched_wakeup_granularity_ns - removed
sched_min_granularity_ns - now sched_base_slice_ns, same units and scale
sched_latency_ns - removed
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
And for dirty_background_(bytes|ratio).
These parameters interact with each other; it is therefore
not sufficient to configure them via the sysctl plugin.
For more details, see
https://docs.kernel.org/admin-guide/sysctl/vm.html#dirty-bytes.
Resolves: RHEL-58820
Since version 0.20, power-profiles-daemon exposes
its DBus interface under "org.freedesktop.UPower.PowerProfiles"
alongside the previous name. To be compatible with PPD, this commit
implements the same change into tuned-ppd.
Resolves: #683
Include its current affinity, cmdline, and cgroup. This may help
identify issues with tuning, e.g., in cases when the process
disappears soon after affining it fails.
Resolves: RHEL-69933
On some Thinkpad laptops, it is possible to change the ACPI
platform profile using function keys (e.g., Fn+L). This can
now trigger a complete profile change if the functionality
is enabled.
Resolves#710.