Currently the logrotation is not configurable. On system with large
amount of cpus a tuned start creates a lot of entries and older log
entries are lost.
The rt-entsk application, part of newer rt-setup packages,
worksaround a latency issue with static key
IPI's. What it does it:
/*
* Open a socket, and enable timestamping on it.
*
* This is to avoid Chrony from changing timestamping
* user count from 0->1 and vice-versa, causing
* static key enable/disable IPIs.
*
*/
Start/stop the systemctl service from the realtime-virtual-host
and realtime-virtual-guest profiles.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
KSM disable code is reimplementing systemctl mask command.
Note only that, but it seems a race is possible where the ksm
services may be starting at the same time as disable_ksm()
is running. I believe the mask command should fix that.
There's an important difference in this new version: we don't
try to start KSM when switching away from the cpu-partitioning
profile. This means KSM will probably remain disabled until
the next reboot.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Previously the sorting was done by comparing the objects themselves,
which is not what we want and it doesn't work in Python 3 - TypeError
is raised, e.g:
TypeError: '<' not supported between instances of 'BootloaderPlugin' and 'MountsPlugin'
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
The previous fix was not sufficient, tuned-adm still tracebacks
in cases when options are specified, but an action is not, e.g.:
$ python3 ./tuned-adm.py -a
Traceback (most recent call last):
File "./tuned-adm.py", line 106, in <module>
action_name = options.pop("action")
KeyError: 'action'
The object returned by ArgumentParser.add_subparsers recognizes
a 'required' attribute (at least in Python 3), which is probably
meant to allow to make specifying an action required, but I wasn't
able to make it work properly, I get errors such as
Traceback (most recent call last):
File "./tuned-adm.py", line 98, in <module>
args = parser.parse_args(sys.argv[1:])
File "/usr/lib64/python3.6/argparse.py", line 1730, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1762, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib64/python3.6/argparse.py", line 1997, in _parse_known_args
', '.join(required_actions))
TypeError: sequence item 0: expected str instance, NoneType found
which I think is not expected. The error is raised here:
6ceab46a60/Lib/argparse.py (L2001)
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
Running tuned-adm without arguments using Python 3 results in
a traceback. This is because in this case parse_args does not
exit with a usage message in Python 3 and the 'action' option
is then undefined. So let's check for this case and print the
usage message ourselves. There may be a better solution to this,
but I wasn't able to come up with anything in a reasonable amount
of time.
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
As noted in the bugzilla ticket
https://bugzilla.redhat.com/show_bug.cgi?id=1554851
The QEMU I/O thread can interrupt the time measurement
of the timer. To avoid this problem, only
pin the vCPU thread.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Reviewed-and-Tested-by: Luiz Capitulino <lcapitulino@redhat.com>
v2:
- Use unix sockets (Luiz)
- Proper numeric output (Luiz)
In the cpu-partitioning profile, IRQ affinity change is already done
as part of the 'isolated_cores' option of the scheduler plugin, so
calling defirqaffinity is, at best, redundant. So let's remove the call.
In the realtime* profiles, it's essentially the same, except that tuna
was used instead of isolated_cores. So let's use built-in functionality
instead of tuna and drop calls to defirqaffinity.
Resolves: rhbz#1590937
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>