1
0
Fork 0
Commit graph

2009 commits

Author SHA1 Message Date
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
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
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
Mario Limonciello
068928e47b Add support for controlling amd-pstate core performance boost
Core performance boost control is added to kernel 6.11.
This sets up the policy to turn it off while in the power saver profile.

Link: https://lore.kernel.org/linux-pm/1a78eeaa-fadd-4734-aaeb-2fe11e96e198@amd.com/T/#m4a0c8917ea8fb033504055bd61512c80c85410c8
2024-06-21 15:31:46 -05:00
Pavol Žáčik
883ba34505
spec: Start tuned-ppd right away if swapping from active PPD
Related: rhbz#2292636
2024-06-21 15:57:42 +02:00
Pavol Žáčik
1706bb4f14
spec: Add standard systemd scriptlet macros for tuned-ppd 2024-06-21 15:57:42 +02:00
Pavol Žáčik
b0be8b915e
tuned-ppd: Remove PIDFile from the systemd service file
The daemon does not write its PID to any file.
2024-06-21 15:57:42 +02:00
Pavol Žáčik
33a6cea033
tuned-ppd: Add an option to log to a file
And adjust the systemd service file to log to
/var/log/tuned/tuned-ppd.log by default.

Additionally, add an option to turn on debug
level logging.
2024-06-21 15:57:42 +02:00
Pavol Žáčik
b3b0892d5b
Install script functions and recommend.d to /usr/lib/tuned/
In #615, they were accidentally moved to /usr/lib/tuned/profiles/
where all profiles were migrated.

This also changes the location of `functions` file within
the repository, separating it from the profiles themselves.

Resolves #642.
2024-06-19 15:41:37 +02:00
Pavol Žáčik
bb39823410
Rename TUNED_PROFILESDIR to TUNED_PROFILES_DIR 2024-06-19 15:24:10 +02:00
Jaroslav Škarvada
5d5dbfccf4
Merge pull request #640 from adriaan42/adriaan/log-warn
chore: remove use of deprecated Logger.warn()
2024-06-15 20:40:54 +02:00
Adriaan Schmidt
85e1e96ae6 chore: remove use of deprecated Logger.warn()
Always use warning(), as warn() has been removed from Python with v3.13.

Signed-off-by: Adriaan Schmidt <adriaan.schmidt@siemens.com>
2024-06-15 09:00:39 +02:00
Steven Skeard
b651198dbf
CNF-13015: Fix helper function not accessing the correct return result 2024-06-12 14:37:57 -04:00
Steven Skeard
d16d3bc794
CNF-13015: Add helper function to run lscpu and parse result using regex parameters
- This is similar to the cpuinfo function that reads from /proc/cpuinfo
- Unfortunately that function was insufficient for our needs as we need to identify both the Vendor and Architecture reliably
2024-06-10 11:35:44 -04:00
Jaroslav Škarvada
0b2461ee78
new release (2.23.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2024-06-06 13:20:27 +02:00
Jaroslav Škarvada
5385fa9972
Merge pull request #636 from zacikpa/lazy-hdparm-checks
Disk plugin: make hdparm device checks lazy
2024-05-30 14:40:32 +02:00
Jaroslav Škarvada
6de25e234b
Merge pull request #622 from zacikpa/reduce-ipi
Avoid unnecessary inter-processor interrupts by checking that writes are necessary
2024-05-30 14:31:18 +02:00