1
0
Fork 0
Commit graph

1013 commits

Author SHA1 Message Date
Luiz Capitulino
685e16640d realtime-virtual-host: script.sh: standardize variable names
script.sh has been using variable names in different ways,
in different scopes: when using variables at all. Fix all that.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2018-02-22 21:03:16 +01:00
Luiz Capitulino
c989a8bd7c realtime-virtual-host: script.sh: unbreak profile loading
Profile loading is broken since commit b532e9291d, due to
a small typo in the new function name.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2018-02-22 21:03:16 +01:00
Luiz Capitulino
c823e3c5f2 functions: add die() function
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2018-02-22 21:03:16 +01:00
Jaroslav Škarvada
f2c0d89d62
spec: fixed building on f27
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-02-22 20:49:44 +01:00
Jaroslav Škarvada
eda1c810d0
Merge pull request #90 from olysonek/makefile
Makefile: refactor
2018-02-22 20:26:42 +01:00
Jaroslav Škarvada
aa1489f3a5
spec: conditionalized python3 build
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-02-05 10:56:48 +01:00
Ondřej Lysoněk
479692432a Makefile: refactor
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-02-02 18:53:45 +01:00
Jaroslav Škarvada
8e202b2877
script: show stderr output in the log
Also fixed cpu-partitioning profile script not to break irqbalance
configuration file in case of defirqaffinity failure.

Resolves: rhbz#1536476

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-01-19 16:13:04 +01:00
Jaroslav Škarvada
869fbabb8e
Merge pull request #87 from oldmikeyang/master
Add support for CentOS
2018-01-19 11:00:46 +01:00
oldmikeyang
ed17d4b994
Add support for CentOS grub.cfg 2018-01-19 16:14:22 +08:00
Jaroslav Škarvada
328521f698
varnetload: more python3 fixes
Maybe this tool could be dropped, there are better alternatives like
iperf, but for now keeping it for backward compatibility.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-01-18 16:47:16 +01:00
Jaroslav Škarvada
1325645765
Merge pull request #85 from olysonek/python3
Python3 support
2018-01-18 16:33:12 +01:00
Ondřej Lysoněk
5816256f93 spec: Use python3 on Fedora > 27 and RHEL > 7
As of this writing, python3-perf is not yet available,
but hopefully it soon will be.
2018-01-14 15:13:50 +01:00
Ondřej Lysoněk
1823a7de64 Makefile: install to python3 destination by default 2018-01-14 15:13:48 +01:00
Ondřej Lysoněk
b716ebfe55 Makefile: support python3 installation
You can now specify the python runtime using the PYTHON variable.
E.g. you can use
  make PYTHON=python3 install
to install tuned modules to the python3 directory and rewrite
shebangs on executable Python files to use Python3.
2018-01-14 15:13:45 +01:00
Ondřej Lysoněk
609f49ec8a spec: Use versioned python macros
For some reason this fixes the following errors during mockbuild:
sh: /usr/bin/python: No such file or directory

The versioned macro is provided by python-devel.
2018-01-14 15:13:43 +01:00
Ondřej Lysoněk
633726723e Fix a syntax error 2018-01-14 15:13:41 +01:00
Ondřej Lysoněk
ee657bc733 Use new syntax for catching exceptions 2018-01-14 15:13:37 +01:00
Ondřej Lysoněk
fba15bf0f6 Use open() instead of file() to open files
file() has been removed in Python3. Also, drop buffering=0 from
the call - it doesn't work in text mode in Python3.
2018-01-14 15:13:35 +01:00
Ondřej Lysoněk
e039f07a96 Use the errno attribute of an exception instead of indices
Obtaining the errno from an exception using e[0] is no longer
possible in Python3.
2018-01-14 15:13:32 +01:00
Ondřej Lysoněk
be9440fb07 Pass universal_newlines = True to Popen()
Use universal_newlines = True in calls to Popen(), in order to get
the output of the executed program as a string in Python3.
2018-01-14 15:13:29 +01:00
Ondřej Lysoněk
e3ed58e160 Fix calling methods of parent classes
This fixes Pylint errors such as the following:
tuned/logs.py:39: [E1003(bad-super-call), TunedLogger.__init__] \
Bad first argument 'self.__class__' given to super()

This prevents infinite recursion errors, see
https://stackoverflow.com/a/18208725

This does introduce name duplication, but when we drop python2 support
in the future, we can use super() without arguments.
2018-01-14 15:13:27 +01:00
Ondřej Lysoněk
560913b6e4 Deal with invalid uses of os.write()
In python3, os.write() expects a bytestring, not a string as
in python2.
2018-01-14 15:13:24 +01:00
Ondřej Lysoněk
09dfe23805 Drop TunedLogger.set_level()
Drop TunedLogger.set_level(). It doesn't appear to be used anywhere
and it causes problems with Python3, because logging._levelNames
doesn't exist anymore.
2018-01-14 15:13:19 +01:00
Jaroslav Škarvada
d8ddccb20d
powertop2tuned: fixed import exception with python2
Related to python3 conversion.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-01-02 16:21:27 +01:00
Jaroslav Škarvada
f563c7d756
An attempt to port Tuned to python3 and keeping it python2 compatible
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-12-21 10:20:13 +01:00
Jaroslav Škarvada
60bb8e293f
Makefile: added support for kvm-unit-tests downloading
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-12-20 15:36:39 +01:00
Jaroslav Škarvada
7ba7ef73ff
Removed CNAME
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-12-19 15:58:24 +01:00
Jaroslav Škarvada
4f79f56e04
Added CNAME
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-12-18 22:16:50 +01:00
Jaroslav Škarvada
b532e9291d
Consolidated scripts and spec file regarding tscdeadline-latency
Related: rhbz#1504680

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-11-14 12:34:41 +01:00
Jaroslav Škarvada
10a59112c0
Merge pull request #79 from bonzini/master
port realtime virtual host profile to Fedora
2017-11-13 16:03:52 +01:00
Ondřej Lysoněk
3c241af1d3 profiles: Use 'power' instead of 'powersave' in energy_perf_bias
The x86_energy_perf_policy program changed its interface in the 4.13
kernel. The value 'power' now has to be used instead of 'powersave'.

Resolves: rhbz#1508468
2017-11-01 16:31:53 +01:00
Jaroslav Škarvada
9587b5550f
Makefile: fixed user recommend.d location
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-29 21:22:54 +01:00
Jaroslav Škarvada
4c6a3088df
Makefile: added $SYSCONFDIR and $SYSCONFDIR/recommend.d
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-29 21:20:29 +01:00
Jaroslav Škarvada
55a8f07ebb
new release (2.9.0)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-29 20:57:37 +01:00
Jaroslav Škarvada
856572edc4
spec: added directory /etc/tuned/recommend.d
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-24 00:41:34 +02:00
Ondřej Lysoněk
c6472e37c0 Fix a variable dereference
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-10-20 16:42:41 +02:00
Jaroslav Škarvada
eeaa444cb3
new release (2.9.0-rc.2)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-20 15:50:25 +02:00
Jaroslav Škarvada
c91357cdf5
cpu-partitioning: store helper state file to /run and few other tweaks
Helper state file for cpu-partitioning script was moved to /run/tuned.
Code for flags manipulation has been simplified.
The /run/tuned directory is explicitly cleared upon uninstallation
of Tuned to get rid of all leftovers / helper files before the reboot.
Added STORAGE_PERSISTENT variable pointing to /var/lib/tuned into
functions to be consistent.

Related: rhbz#1497182

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-20 15:13:45 +02:00
Paolo Bonzini
d41ee92a3a port realtime virtual host profile to Fedora
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-10-20 14:24:12 +02:00
Luiz Capitulino
b39c2af9db cpu-partitioning: add no_rebalance_cores= option
As cpu-partitioning doesn't use isolcpus=, isolated CPUs can incur
very high latency due to load balancing performed by the kernel
scheduler.

This patch introduces a new configuration option called
no_rebalance_cores=. This options allow users to set a range
of CPUs to have load balancing disabled from /proc. It is
expected that users will only disable load balancing on CPUs
which run PMD threads (or vCPU threads running PMD threads),
since disabling this for all isolated CPUs can cause certain
performance problems for OpenStack.

Here are some numbers:

 - Without using no_rebalance_cores=, I can easily get 40us+
   in load balancing isolated CPUs:

           <...>-14140 [001]  1656.121155: funcgraph_entry:      + 43.927 us  |  rebalance_domains();
           <...>-14140 [001]  1660.117150: funcgraph_entry:      + 41.587 us  |  rebalance_domains();
           <...>-14140 [001]  1658.119152: funcgraph_entry:      + 41.565 us  |  rebalance_domains();
           <...>-14140 [001]  1668.110140: funcgraph_entry:      + 40.539 us  |  rebalance_domains();

 - When using no_rebalance_cores=, the maximum latency I
   get is ~ 1us:

           <...>-2440  [012]  1705.078076: funcgraph_entry:        1.024 us   |  rebalance_domains();
           <...>-2438  [008]  2021.065218: funcgraph_entry:        0.995 us   |  rebalance_domains();
           <...>-2447  [010]  2223.057289: funcgraph_entry:        0.991 us   |  rebalance_domains();

  IMPORTANT: 10 minutes run only.

This solution was developed by Andrew Theurer <atheurer@redhat.com>,
I'm merely integrating it into the profile.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-10-20 13:51:33 +02:00
Jaroslav Škarvada
c3e18790ec Merge pull request #77 from olysonek/variables
Expand variables in the 'devices' option
2017-10-18 00:17:22 +02:00
Ondřej Lysoněk
d2557284f7 Expand variables in the 'devices' option
Variables in the 'devices' option were not being expanded. This is
bad. It shows that the current variable expansion system is broken.
We need to come up with a consistent, well-defined way of expanding
variables. Preferably it should be done all in one place.

The expansion is probably still not done for options 'type', 'enabled',
'replace', 'devices_udev_regex', 'script_pre' and 'script_post'. Let's
deal with that later, as we don't need it in our profiles right now.

Related: rhbz#1490399

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-10-16 17:44:45 +02:00
Ondřej Lysoněk
2e4cb7339b Fix an inconsistency regarding a None value
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-10-16 12:12:56 +02:00
Jaroslav Škarvada
2243cb7a45
spec: added fix to work with pre-release
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-13 13:45:05 +02:00
Jaroslav Škarvada
0d2986d459
new release (2.9.0-rc.1)
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-13 00:02:10 +02:00
Jaroslav Škarvada
79d995a3fb
sap-hana: change force_latency to 70
Resolves: rhbz#1501252

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2017-10-12 17:10:21 +02:00
Ondřej Lysoněk
9fef12dddf cpu-partitioning: Fix typo in 00-tuned-pre-udev.sh
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-10-12 16:30:33 +02:00
Jaroslav Škarvada
a31d9f9455 Merge pull request #75 from olysonek/defirqaffinity
defirqaffinity: Handle errors when settig smp_affinity
2017-10-11 18:33:22 +02:00
Ondřej Lysoněk
581062dd34 Make errors less verbose in save_active_profile()
Hopefully this will make it more user-friendly.

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2017-10-11 16:14:00 +02:00