1
0
Fork 0
Commit graph

1415 commits

Author SHA1 Message Date
Jaroslav Škarvada
398f943f70
Merge pull request #250 from olysonek/disable-timer-migration
cpu-partitioning: Disable kernel.timer_migration
2020-04-29 16:58:00 +02:00
Jaroslav Škarvada
56c294727e
Merge pull request #247 from dlan17/master
drop bashism syntax, make it happy with dash
2020-04-29 16:42:05 +02:00
Jaroslav Škarvada
889743dcd6
Merge pull request #242 from olysonek/man-page-fix
man: Document the possibility to apply more than one profile
2020-04-29 16:36:52 +02:00
Jaroslav Škarvada
0a001186e6
Merge pull request #243 from jmencak/irqbalance-restart
Try-restart irqbalance service upon writing /etc/sysconfig/irqbalance
2020-04-16 15:56:14 +02:00
Jiri Mencak
8d5f5ec4b1 Try-restart irqbalance service upon writing /etc/sysconfig/irqbalance
Relates to: rhbz#1784645

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2020-04-16 15:19:49 +02:00
Jaroslav Škarvada
3e2b7069fa
Merge pull request #248 from jmencak/bootcmdline-unapply
Unapply bootcmdline settings even when grub.cfg does not exits.
2020-04-16 15:03:48 +02:00
Jaroslav Škarvada
595b8e0996
Merge pull request #249 from hroncok/no-unittest2
Remove usage of unittest2, use unittest from the standard library
2020-03-31 18:38:20 +02:00
Jaroslav Škarvada
15a34ee68d
Merge pull request #256 from yarda/functions-fix-max-args
builtin_functions: fixed check for number of arguments
2020-03-23 19:46:33 +01:00
Jaroslav Škarvada
9ec93ccf59
builtin_functions: fixed check for number of arguments
There can be lower number of arguments than the max limit.
Also fixed definition of functions which wrongly used the API.

I.e. it should work this way:
 # exactly 3 arguments
 __init__("FUNC", 3, 3)

 # max 4 arguments, min 3 arguments (3 - 4 arguments)
 __init__("FUNC", 4, 3)

 # max 3 arguments (0 - 3 arguments)
 __init__("FUNC", 3)

 # min 3 arguments (3 - infinity arguments)
 __init__("FUNC", 0, 3)

 # arbitrary number of arguments (0 - infinity arguments)
 __init__("FUNC", 0)

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-03-23 16:35:43 +01:00
Jaroslav Škarvada
751cdb497b
Merge pull request #255 from yarda/rhbz1797025
realtime: added support for managed_irq
2020-03-23 15:35:34 +01:00
Jaroslav Škarvada
5ed61ce394
realtime: added conditional support for managed_irq
Also added regex_search_ternary built-in function.

It takes arguments in the following form:
  STR1, REGEX, STR2, STR3

If REGEX matches STR1 (re.search is used), STR2 is returned,
if it doesn't match STR3 is returned.

Example:
[variables]
foo=Y
bar=${f:regex_search_ternary:${foo}:\b[y,Y,1,t,T]\b:foo:bar}

It will result in the 'foo' string stored in the '${bar}' variable.

Resolves: rhbz#1797025

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-03-23 14:43:47 +01:00
Ondřej Lysoněk
aa859eecdd cpu-partitioning: Disable kernel.timer_migration
Reportedly, it's no longer needed.

Resolves: rhbz#1797629

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-02-26 17:42:12 +01:00
Miro Hrončok
2399aa3b2d Remove usage of unittest2, use unittest from the standard library
Fixes https://github.com/redhat-performance/tuned/issues/241

Fedora is removing the unittest2 package: https://bugzilla.redhat.com/show_bug.cgi?id=1794222

tuned is not targeting Python 2.6: https://github.com/redhat-performance/tuned/issues/241#issuecomment-588320175

One thing not present in Python 2.7 is assertItemsEqual() -- renamed to assertCountEqual().

Related, mock was also listed as a requirement in the spec file,
but all the imports are from unittest.mock, hence removed.
2020-02-25 20:04:51 +01:00
Jiri Mencak
8dbb93499b Unapply bootcmdline settings even when grub.cfg does not exits.
Currently when grub.cfg file is not found, the [bootloader] plugin still
modifies /etc/tuned/bootcmdline file.  However, during rollbacks, the settings
applied to that file are not rolled back.  This becomes a problem in
(containerized) environments when grub.cfg file does not exist.  This patch
will make the behaviour more consistent and unapply the settings in
/etc/tuned/bootcmdline even when no grub.cfg is found.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2020-02-25 19:52:01 +01:00
Yixun Lan
8ed2f8fc61 drop bashism syntax, make it happy with dash
see bug report at
https://github.com/redhat-performance/tuned/issues/246
https://bugs.gentoo.org/706164

Signed-off-by: Yixun Lan <dlan@gentoo.org>
2020-02-16 12:27:03 +00:00
Jaroslav Škarvada
9bb73e8f40
Merge pull request #245 from yarda/sst-rename-to-intel-sst
profiles: renamed sst profile to intel-sst
2020-02-12 11:37:19 +01:00
Jaroslav Škarvada
20a71af333
profiles: renamed sst profile to intel-sst
Also updated intel-sst profile manual page describing its usage.

Related: rhbz#1743879

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-02-11 17:44:06 +01:00
Ondřej Lysoněk
0bfb310f53 man: Document the possibility to apply more than one profile
'tuned-adm profile' accepts more than one profile. Document it in the
man page.

Resolves: rhbz#1794337

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-02-10 18:17:23 +01:00
Jaroslav Škarvada
bfe0eb9194
Merge pull request #244 from olysonek/new-accelerator-performance-profile
Add accelerator-performance profile
2020-02-06 17:59:02 +01:00
Ondřej Lysoněk
9535680992 Add accelerator-performance profile
Resolves: rhbz#1795604

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-02-06 17:55:21 +01:00
Jaroslav Škarvada
041333f9c5
Merge pull request #240 from yarda/rhbz1779117
realtime-virtual-host: added ncat requirement
2020-01-14 11:27:27 +01:00
Jaroslav Škarvada
cc11660689
realtime-virtual-host: added ncat requirement
resolves: rhbz#1779117

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2020-01-13 21:29:00 +01:00
Jaroslav Škarvada
d5dce53187
Merge pull request #239 from olysonek/define-empty-isolated-cores
profiles: Make sure variables are defined before use
2020-01-07 22:30:14 +01:00
Ondřej Lysoněk
0eb0c6bc7f profiles: Make sure variables are defined before use
Make sure the isolated_cores and no_balance_cores variables are
defined before any of the variables that use them are defined. This
enforces a certain ordering of variable expansions so that child
profiles can set the variables directly in the profile (tuned.conf),
e.g.:

[main]
include=cpu-partitioning

[variables]
isolated_cores=3

Resolves: rhbz#1781664

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2020-01-06 15:50:06 +01:00
Jaroslav Škarvada
f753351bff
Merge pull request #196 from TomasKorbar/circleci
Start using CircleCi
2019-12-12 17:49:58 +01:00
Jaroslav Škarvada
98b654c4ff
Merge pull request #236 from olysonek/oracle-profile-update
oracle: Turn off NUMA balancing
2019-12-12 17:48:05 +01:00
Ondřej Lysoněk
251a9e89d3 oracle: Turn off NUMA balancing
Turn off NUMA balancing, according to feedback from the performance
team.

Resolves: rhbz#1782233

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-12-12 17:41:38 +01:00
Jaroslav Škarvada
193b9fa641
new release (2.13.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-12-11 18:13:16 +01:00
Jaroslav Škarvada
c374ca62e4
Merge pull request #234 from prarit/sst_v1
Add Intel Speed Select Technology (SST) Profile
2019-12-11 18:09:39 +01:00
Prarit Bhargava
bcdb24862e Add Intel Speed Select Technology (SST) Profile
Intel's new Speed Select Technology (SST) is a process power management
technology introduced by Intel that allows for throughput and per-core
performance configurations and optimizations such as allowing for
prioritization of workloads on specific cores by sacrificing performance
on other cores.

Intel has released several CascadeLake processors, commonly referred to
as CascadeLake-N, with this technology and will introduce further SST
related technologies in the next few years.

These new technologies require the disabling of the intel-pstate driver
configuration in tuned as it may interfere with the user chosen per-core
configurations of SST.

Add a new SST profile to tuned for general use.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Joe Mario <jmario@redhat.com>
2019-12-11 08:52:52 -05:00
Jaroslav Škarvada
076efbfc45
Merge pull request #233 from olysonek/update-latency-performance
latency-performance: Update sysctl tunings
2019-12-11 14:33:31 +01:00
Jaroslav Škarvada
26aacd192c
Merge pull request #231 from yarda/rhbz1779821
sap-hana: updated tuning
2019-12-11 14:06:48 +01:00
Ondřej Lysoněk
7a70fabb4c latency-performance: Update sysctl tunings
Update sysctl tunings in the latency-performance profile based on
feedback from the performance team.

Resolves: rhbz#1779759

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-12-09 13:08:01 +01:00
Jaroslav Škarvada
52156a00b5
sap-hana: updated tuning
Made sap-hana profile standalone.

Resolves: rhbz#1779821

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-12-06 16:43:08 +01:00
Tomas Korbar
925e7d1764 Stop using Travis
We replaced travis with packit.
Also remove Dockerfile because we do not need it anymore.

Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
2019-12-02 12:20:33 +01:00
Jaroslav Škarvada
d11c907be0
new release (2.13.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-12-01 16:49:38 +01:00
Jaroslav Škarvada
72b96352d2
Merge pull request #229 from yarda/drop-instance-option
Added drop option allowing dropping options from inherited plugins
2019-12-01 11:01:09 +01:00
Jaroslav Škarvada
aacd51081d
Merge pull request #230 from yarda/force-latency-none
latency: support None value
2019-11-29 13:17:25 +01:00
Jaroslav Škarvada
073ccc5646
Merge pull request #223 from openSUSE/remove_defirqaffinity.py
Remove defirqaffinity.py
2019-11-29 11:44:10 +01:00
Jaroslav Škarvada
120bb69d3f
latency: support None value
This allows writing e.g.:
[cpu]
force_latency=cstate.name:XYZ|None

In this case if C-state with name XYZ doesn't exist force_latency
will be evaluated to 'None' and nothing will be set and no
error will be reported. If '|None' is omitted, error will be
reported.

Another example:
[cpu]
force_latency=None

Here, it will also set nothing and no error will be reported.

When 'None' is encountered it stops parsing the latency, so writing
'None|1' will also result in no latency set. Both 'none' and 'None' can
be used interchangeably with the same effect.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-11-29 01:25:59 +01:00
Jaroslav Škarvada
0fadc85722
Merge pull request #222 from TomasKorbar/remove-flexmock
Replace python flexmock module with builtin mock
2019-11-28 14:18:54 +01:00
Thomas Renninger
727b8309c9 Mark defirqaffinity.py deprecated via stderr/log message
The last callers using defirqaffinity.py had been nuked by this commit:
c2dfc1f

Before fully ripping the script out, it should be marked deprecated
for some time.
2019-11-28 10:53:36 +01:00
Tomas Korbar
140d982354 Replace python flexmock module with builtin mock
Also replace dependency in specfile and alter dockerfile

Signed-off-by: Tomas Korbar <tkorbar@redhat.com>
2019-11-28 07:54:15 +01:00
Jaroslav Škarvada
d35574446d
Merge pull request #225 from olysonek/fix-sighup-profile-switch
Fix a hang on SIGHUP when the preset profile does not exist
2019-11-28 00:26:01 +01:00
Jaroslav Škarvada
4139efa957
Merge pull request #226 from olysonek/reapply-sysctl-fix
sysctl: Make reapply_sysctl ignore configs from /usr
2019-11-28 00:14:50 +01:00
Jaroslav Škarvada
598c506729 Added drop option allowing dropping options from inherited plugins
Consider the following:
profile_1:
[cpu]
force_latency=10
no_turbo=1

[disk]
readahead=4098

If you want to include it in profile_2 and just drop the force_latency
option now you can write:
[main]
include=profile_1

[cpu]
drop=force_latency

Previously, you had to use the replace option and add all other options
which were used in the inherited profiles like:
[main]
include=profile_1

[cpu]
replace=true
no_turbo=1

There can be named multiple options in the drop. As the delimiter comma
',' or semicolon ';' can be used, spaces are ignored, e.g.:
[cpu]
drop=force_latency, no_turbo

Fixes: #227

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-11-27 16:49:54 +01:00
Jaroslav Škarvada
b5fbf47ff5
Merge pull request #228 from yarda/base-plugin-options-parser-fix
unit: accept "True" for replace and enabled options
2019-11-27 16:49:33 +01:00
Ondřej Lysoněk
14053bc98a sysctl: Make reapply_sysctl ignore configs from /usr
The reapply_sysctl functionality was originally added to address
rhbz#1302953, which was about Tuned overriding sysctl config files
from /etc, which was deemed undesirable. The bug said nothing about
sysctl config files from /usr/lib/sysctl.d, /lib/sysctl.d or
/usr/local/lib/sysctl.d.

Having sysctl configs from /usr override Tuned profiles causes
problems (rhbz#1759597). Also, it seems reasonable for Tuned profiles
to override sysctl configs from /usr - a Tuned profile is often
explicitly chosen by the user, whereas sysctl configs from /usr are
provided by system packages whether the user wants them or not.

Also, in RHEL-6, tuned used to ignore sysctl config files from /usr,
as far as I can tell.

Resolves rhbz#1759597

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-11-27 16:22:18 +01:00
Jaroslav Škarvada
d6f0a09dac unit: accept "True" for replace and enabled options
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2019-11-27 14:13:12 +01:00
Ondřej Lysoněk
d545b13dc1 controller: Proceed with reload even if daemon is not running
To fix rhbz#1774645 and rhbz#1702724, we need to make the
`Controller.reload` operation behave the same as a Tuned restart even
in the case when Tuned is running but no profile is applied. To
achieve that, we must not `return False` from `reload()` when Daemon
is not running.

I'm not aware of any specific purpose the `return False` could serve,
other than perhaps making sure that running reload after `tuned-adm
off` does not result in the recommended profile being applied. This
case is handled in commit 5d8ef2c009, so I think it should be safe
now to drop the `return`.

Resolves: rhbz#1774645
Resolves: rhbz#1702724

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2019-11-27 10:53:03 +01:00