1
0
Fork 0
Commit graph

2033 commits

Author SHA1 Message Date
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
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
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
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