1
0
Fork 0
Commit graph

2243 commits

Author SHA1 Message Date
Jaroslav Škarvada
297e240834
Merge pull request #693 from zacikpa/autodocs
Automatic generation of plugin docs from their docstrings
2024-12-11 20:39:03 +01:00
Jaroslav Škarvada
cd44cbac75
Merge pull request #691 from zacikpa/perf-events-fix
scheduler: Do not assume that perf events have type attribute
2024-12-11 19:09:27 +01:00
Jaroslav Škarvada
0c33999ef9
Merge pull request #687 from adriaan42/adriaan/fix-verify-all-device-commands
fix: expand variables in Plugin._verify_all_device_commands
2024-12-11 18:01:52 +01:00
Jaroslav Škarvada
eb460a1f05
Merge pull request #686 from dufuhang/master
`check_positive` has some contradictions
2024-12-11 17:48:32 +01:00
Jaroslav Škarvada
ceff544bda
Merge pull request #681 from gsauthof/service-mkdir
Allow shared service drop-in directory
2024-12-11 17:42:28 +01:00
Jaroslav Škarvada
f22120c54a
Merge pull request #680 from evgeni/drop-cpuspeed
drop support for cpuspeed
2024-12-11 16:49:31 +01:00
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
55e272e263
scheduler: Log process info when its affinity cannot be changed
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
2024-12-06 10:36:34 +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
Misaki Kasumi
3a1a52f4b9 plugin_cpu: allow raw energy_performance_preference values 2024-12-02 13:29:05 +08: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
3c3d1b21a1
Add variables to BLS entries only if grub is used
The bootloader plugin needs patched BLS entries with the TuneD variables.
It seems variables in the BLS entries is grub extension which is not
described in the BLS specification. It can cause boot problems with e.g.
systemd-boot, thus add variables to BLS entries only if the BLS entries
were generated by grub.

Resolves: rhbz#2323514

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-11-05 00:56:12 +01:00
Jaroslav Škarvada
83e2c88f65
powertop2tuned: use default user profile path from the consts
Fixes #701

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-11-03 23:07:38 +01:00
Jim Ramsay
e5cd263b59 Do not initialize kvm low latency if kvm not present
On systems mising the kvm module, skip any attempts to initialize kvm.

Signed-off-by: Jim Ramsay <jramsay@redhat.com>
2024-10-25 23:19:59 -04: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
60d819e87a
tuned-ppd: Use effective hold profile when adding profile holds
To behave the same as power-profiles-daemon, the power-saver
profile holds should have priority even if performance holds
were added later.
2024-10-14 09:43:11 +02:00
Pavol Žáčik
261efaa8b5
Bump doc/manual revision date and number 2024-10-11 12:45:21 +02:00
Pavol Žáčik
e68382e1fb
Clean up plugin docstrings 2024-10-11 12:45:20 +02:00
Pavol Žáčik
71b41394e2
Add a script for generation of plugin docs from docstrings
The script simply joins an introduction text with the
docstrings of all plugin classes.
2024-10-11 12:45:20 +02:00
Pavol Žáčik
9935a951e9
scheduler: Do not assume that perf events have type attribute
The perf.evlist.read_on_cpu function may return instances of
classes that do not have the type attribute, e.g. perf.lost_event.
Make sure we do not read the type attribute if we are not sure
that it exists.

Resolves: RHEL-60898
2024-09-30 15:23:33 +02:00
dufuhang
ae2cfd52e8 Fix the error in the raise statement of check_positive()
1. In the raise statement of the check_positive() function, the error message conflicts with the if condition.
2. If the value of val is 0, it passes the if condition but raises an error message stating [0 has to be >= 0].
3. This PR removes the = from the raise statement, so when val is 0,
it will correctly prompt that the value of val [has to be > 0].

Signed-off-by: dufuhang <dufuhang@kylinos.cn>
2024-09-14 16:49:51 +08:00
Adriaan Schmidt
a7aa2ab4b9 fix: expand variables in Plugin._verify_all_device_commands
Need to expand variables before calling the @command function. This is
actually done for _execute_all[_non]_device_commands and
_verify_all_non_device_commands, but not in _verify_all_device_commands.
This adds the missing expansion.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-09-11 09:42:50 +02:00
Georg Sauthoff
e8e3f5cf29 Allow shared service drop-in directory
Systemd reads all conf files from a service drop-in directory and merges
them.

This change enables the following use case:

Tuning unrelated but local changes can be put into - say:

    /etc/systemd/system/sfptpd.service.d/local.conf

while a simple tuning such as the process affinity mask is rolled out
via a tuned profile, like this:

`tuned.conf` snippet:

```
[service]
service.sfptpd=,file:${i:PROFILE_DIR}/tuned-sfptpd.conf
```

`tuned-sfptpd.conf`:

```
[Service]
CPUAffinity=32
```

---

Arguably, this is a natural change, i.e. it establishes symmetry in
`cfg_install()` to `cfg_uninstall()`, because `cfg_uninstall()` already
allows for the service drop-in directory not being empty.
2024-08-30 11:48:40 +02:00
Evgeni Golov
9e9771b8c7 drop support for cpuspeed
cpuspeed has not been in Fedora since 2011 [1] and last time in RHEL 6.

it should be fairly safe to drop support for it now

[1] https://bugzilla.redhat.com/show_bug.cgi?id=713572
2024-08-23 20:38:00 +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