1
0
Fork 0
Commit graph

2023 commits

Author SHA1 Message Date
Jaroslav Škarvada
c829fa5f41
Merge pull request #679 from zacikpa/no_turbo_bool_fix
Parse no_turbo cpu plugin option using commands.get_bool
2024-12-11 16:47:39 +01:00
Jaroslav Škarvada
d9293d7f39
Merge pull request #669 from zacikpa/ppd-adjustments
More tuned-ppd adjustments
2024-12-11 16:12:57 +01:00
Pavol Žáčik
23eb673571
tuned-ppd: Enable changing profile via function keys
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.
2024-12-03 15:40:45 +01:00
Pavol Žáčik
038dceadc0
tuned-ppd: Use inotify to check for performance degradation
Instead of actively polling for changes in the relevant files,
set up inotify handlers which are invoked when the files change.
2024-12-03 15:40:45 +01:00
Pavol Žáčik
f2d4913562
tuned-ppd: Require the presence of the balanced profile
To be consistent and make sure tuned-ppd works well with
its users no matter the configuration, the balanced profile
must be required in the configuration file, similarly to
the power-saver and performance profiles.

If no default profile is specified in the configuration,
this also sets the default profile to balanced, not raising
any exceptions like before.
2024-12-03 15:40:45 +01:00
Pavol Žáčik
2605fedf5b
tuned-ppd: Add the version property
This makes tuned-ppd fully API-compatible with
the latest power-profiles-daemon. The property
will signify the level of API compatibility with
power-profiles-daemon.
2024-12-03 15:40:45 +01:00
Pavol Žáčik
86b1b48f98
tuned-ppd: Add docstrings 2024-12-03 15:40:44 +01:00
Pavol Žáčik
d5bd033422
tuned-ppd: Keep track of active and base profile
Instead of querying TuneD each time we want to determine the active
TuneD profile, remember its value. Also watch for signals from TuneD,
updating the value when the TuneD profile changes (resolves #689).

The daemon now also keeps track of the "base" PPD profile, which is
restored when all profile holds are released or when tuned-ppd is
restarted. For the latter purpose, this profile is also saved in a file.

Direct access via two dictionaries (one for AC, one for DC)
was clumsy, this commit replaces it with a new class - ProfileMap.
2024-12-03 15:40:05 +01:00
Pavol Žáčik
79547f093f
tuned-ppd: Fix UPower signal handler initialization
Make sure that we only initialize the UPower signal
handler only if such a handler is not already running.

This also reorders the order of operations in the initialization
procedure, skipping redundant initial TuneD profile changes.
2024-12-03 15:13:16 +01:00
Jaroslav Škarvada
90c24eea03
new release (2.24.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-11-26 13:52:17 +01:00
Jaroslav Škarvada
35eed3ca3e
Merge pull request #665 from yarda/spec-profile-paths-macro
spec: used macro for profiles path and other fixes
2024-10-16 12:02:10 +02:00
Jaroslav Škarvada
7a419499b1
spec: used macro for profiles path and other fixes
- improved conditionals for better readability
- fixed tuned-ppd not to run install twice
- used macro for profiles path
- consolidated names of related variables
- updated Makefile to update the current profile paths during
  installation
- fixed tests to use correct profile directory on RHEL/CentOS
- consolidated whitespaces and variable names in fixed tests

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-10-16 11:13:28 +02:00
Jaroslav Škarvada
8570e80802
Merge pull request #663 from adriaan42/adriaan/no-tuna
realtime: remove leftover use of tuna
2024-10-14 14:39:10 +02:00
Pavol Žáčik
3e98b30178
Parse no_turbo cpu plugin option using commands.get_bool
The no_turbo knob only recognizes 0 or 1, so we have to
convert the option value defined in the profile to an
integer if necessary.

Related: #630
Resolves: RHEL-51760
2024-08-22 14:30:28 +02:00
Jaroslav Škarvada
c082797fd0
Merge pull request #672 from AdamWill/set-on-battery-before-switch-profile
controller init: set _on_battery before switching profile
2024-08-19 16:06:47 +02:00
Adam Williamson
18313432e0 controller init: set _on_battery before switching profile
Since 6ef5b58e , switch_profile expects self._on_battery to be
set, but when it's called in Controller.initialize, it is
called before we do self._on_battery = False , and will crash
with
AttributeError: 'Controller' object has no attribute '_on_battery'
if the requested profile is not the currently active one.

This fixes that by moving the call to switch_profile after
self._on_battery is set.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-08-15 13:14:58 -04:00
Jaroslav Škarvada
0a85d3c85b
new release (2.24.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-08-07 22:09:40 +02:00
Jaroslav Škarvada
4eee2fe930
Merge pull request #666 from zacikpa/repo-remove-old-plugins
Clear plugin repository when stopping tuning
2024-08-07 20:35:06 +02:00
Pavol Žáčik
f8858f69fb
Clear plugin repository when stopping tuning
Not clearing it before a profile switch would
result in never deleting the original plugin
objects - those would accumulate in memory with
each profile switch.

Relates: RHEL-36442
2024-08-02 11:40:46 +02:00
Jaroslav Škarvada
b4345ba00b
Merge pull request #664 from yarda/balaced-battery-man
man: add description of the balanced-battery profile
2024-07-29 15:26:18 +02:00
Jaroslav Škarvada
bf5beae261 man: add description of the balanced-battery profile
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-07-27 12:08:16 +02:00
Jaroslav Škarvada
051bd519e3
new release (2.24.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-07-25 23:55:47 +02:00
Adriaan Schmidt
c690b5ec3e realtime: remove leftover use of tuna
Before the `scheduler` plugin, `tuna` was used for CPU isolation.
There is a leftover use in the verification of the `realtime` profile.
Removing that, the dependency on the `tuna` package, and now-empty
scripts from the realtime profiles.

closes #594

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-07-25 17:17:43 +02:00
Jaroslav Škarvada
baa0ef3496
Merge pull request #657 from adriaan42/adriaan/irqbalance-banned-cpulist
Update irqbalance configuration
2024-07-25 13:48:33 +02:00
Adriaan Schmidt
71d1597b97 chore: remove dead irqbalance functions
The shell functions in profiles/functions related to irqbalance configuration
have been unused since 462df2610c. Remove them.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-07-25 07:02:02 +02:00
Adriaan Schmidt
7825b11330 plugin_irqbalance: switch to IRQBALANCE_BANNED_CPULIST
The option IRQBALANCE_BANNED_CPUS we're currently using has been deprecated [1],
so switch to IRQBALANCE_BANNED_CPULIST instead.

closes #656

[1] c995237885

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-07-25 07:02:02 +02:00
Jaroslav Škarvada
1c4cb62b7a
Merge pull request #659 from zacikpa/defunct-affinity
plugin_scheduler: Adjust error logging in _set_affinity
2024-07-24 20:46:15 +02:00
Jaroslav Škarvada
e547fefed3
Merge pull request #658 from adriaan42/adriaan/fix-irq-variable-expand
fix: expand variables in plugin_irq
2024-07-24 19:59:01 +02:00
Jaroslav Škarvada
cff5e91056
Merge pull request #647 from superm1/cpb-boost
Add support for controlling amd-pstate core performance boost
2024-07-24 19:26:38 +02:00
Jaroslav Škarvada
46ee2d10bf
Merge pull request #661 from zacikpa/release-cp-functions
Add `functions` to the files copied by the release-cp Makefile target
2024-07-24 12:43:08 +02:00
Jaroslav Škarvada
e8bea35837
Merge pull request #651 from zacikpa/fix-variable-support-test
Beakerlib tests adjustments
2024-07-24 01:42:32 +02:00
Jaroslav Škarvada
cbf7bf7e4a
Merge pull request #650 from wangwillian0/master
Enable controller reset for audio by default
2024-07-24 01:32:19 +02:00
Jaroslav Škarvada
5b59b84235
Merge pull request #646 from zacikpa/tuned-ppd-adjustments
Tuned ppd adjustments
2024-07-24 01:28:04 +02:00
Jaroslav Škarvada
b2adce8cae
Merge pull request #637 from yarda/hotplug_dev_init_wait
hotplug: wait for device initialization
2024-07-24 00:56:18 +02:00
Jaroslav Škarvada
27349f8025
hotplug: wait for device initialization
Resolves: RHEL-39468

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-07-23 15:49:34 +02:00
Jaroslav Škarvada
adfb1faa82
Merge pull request #610 from sgruszka/uncore_matching
Add package to {cpus,uncores} matching functions
2024-07-23 14:32:52 +02:00
Pavol Žáčik
dc208965ee
Add functions to the files copied by the release-cp Makefile target
This change was forgotten during #644, therefore causing errors
when running `make rpm`.
2024-07-23 13:26:33 +02:00
Stanislaw Gruszka
9312ac2df5 Add package2cpus and packages2uncores matcher functions
Allow to specify CPUs and uncores using package (socket) number.

type=cpu
devices=${f:package2cpus:2}  # cpus from package 2

type=cpu
devices=${f:package2cpus:1*} # cpus from any package started from 1 i.e. 11, 12, 13 ...

type=uncore
devices=${f:package2uncores:1:5:9}  # uncores from package 1, 5 and 9

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
2024-07-23 09:56:51 +02:00
Jaroslav Škarvada
ae5d3e4e77
Merge pull request #644 from zacikpa/profile-migration-fix
Profile migration fix
2024-07-22 18:13:48 +02:00
Jaroslav Škarvada
8143d2c7da
Merge pull request #611 from sgruszka/uncore_percent
uncore: Allow to configure frequency limits using percent
2024-07-22 18:08:19 +02:00
Stanislaw Gruszka
94a6702770 uncore: Allow to configure frequency limits using percent
Using direct frequency values in only useful in specialistic profiles
where we know target platform. Allow to configure uncore frequency as
percent of hardware maximum/minimum frequency. Such parameters can be
used in generic profiles like 'balanced' in portable way, for example:

[uncore]
max_freq_khz=90%

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
2024-07-16 10:30:45 +02:00
Jaroslav Škarvada
3ea853b16d
Merge pull request #638 from fontivan/sskeard/cnf-13015-cpu-architecture-vendor-detection-tuned
CNF-13015: Add helper function to run `lscpu` and parse result using regex parameters
2024-07-15 14:10:11 +02:00
Pavol Žáčik
30908c3691
plugin_scheduler: Adjust error logging in _set_affinity
Do not report an error if a process is defunct even if it
is not bound to specific CPUs: failing to change its affinity
does not have any negative effects.

Refactor the helper function _affinity_changeable to
_ignore_set_affinity_error and make it return True/False
depending on whether the failed affinity change can be
ignored (i.e., not reported as an error).

Do not check for vanished processes twice, the later
check is sufficient.

Resolves: RHEL-46560
2024-07-12 11:23:50 +02:00
Adriaan Schmidt
18a95d039e fix: expand variables in plugin_irq
Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-07-09 06:05:14 +02:00
Pavol Žáčik
609f2a47b0
tests: Restore TuneD service after the error messages test 2024-06-25 09:10:30 +02:00
Pavol Žáčik
b00c5984b5
tests: Do not run tunedDisableSystemdRateLimitingStart via rlRun 2024-06-25 08:32:42 +02:00
Willian Wang
214302240f Enable controller reset for audio by default
It fixes Nvidia suspension for laptops
2024-06-24 17:58:09 -03:00
Pavol Žáčik
0c1048070b
tuned-ppd: Adjust log message emitted when battery status changes
The profile may not change, so do not log that we are switching
a profile.
2024-06-24 15:33:52 +02:00
Pavol Žáčik
dd0f0fb317
tuned-ppd: Refactor daemon initialization
- Only use the default profile from the configuration file if
  TuneD is not already running with an active profile. This
  makes the daemon "recall" the active profile after a restart.

- Make sure that SIGHUP completely resets the daemon, including
  resetting the 'battery' and 'performance_degraded' status.
2024-06-24 15:05:45 +02:00
Pavol Žáčik
5fe5efc162
tuned-ppd: Remove magic constant "unknown" 2024-06-24 15:04:24 +02:00