1
0
Fork 0
Commit graph

28 commits

Author SHA1 Message Date
Jaroslav Škarvada
1cb641bd18
Merge pull request #331 from jmencak/ksmtuned-no-errors
Prevent unnecessary ksm* error log messages.
2021-12-08 23:05:01 +01:00
Nicolas Saenz Julienne
e4a0e48886 realtime-virtual-host: Disable kvm.nx_huge_pages module option
The 'nx_huge_pages' option, will force any executable page mapping to be
performed at 4KiB granularity and requires any existing overlapping
huge-page mapping to be also split in 4KiB chunks[1]. This is due to a HW
bug that doesn't affect our NFV use-cases.

The way a huge-page mapping is dropped is by simply deleting the EPT
entry and flushing TLB caches on all affected CPUs. Next vCPU access to
that address will trigger an EPT_VIOLATION, which will jump into the
host for it to handle the page-fault. In our specific case, this means
all isolated CPUs running oslat will hit an EPT_VIOLATION almost exactly
at the same time. Which is bad enough already, but, given our systems
might have a huge number of isolated CPUs, will also create a lot of
contention over the KVM MMU lock. This has been observed to trigger
~100us latency spikes while testing with oslat.

So let's disable the 'kvm.nx_huge_pages' module option.

[1] see kernel commit b7e8c8303ff28

Resolves: rhbz#1976825
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
2021-06-28 18:53:38 +02:00
Jiri Mencak
571a255d57 Prevent unnecessary ksm* error log messages.
Check the presence of ksm and ksmtuned units before (un)masking them.

Signed-off-by: Jiri Mencak <jmencak@users.noreply.github.com>
2021-03-17 18:05:21 +01: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
Peter Xu
4a8e64994e cpu-partitioning: Introduce irqbalance helpers and use
Provide irqbalance_banned_cpus_{setup|clear} for tuning irqbalance.
Use them in cpu-partitioning.

Signed-off-by: Peter Xu <peterx@redhat.com>
2019-07-10 13:09:03 +08:00
Jaroslav Škarvada
c4a0aef63d
functions: reworked setup_kvm_mod_low_latency to count with kernel changes
It updates the KVM modprobe file if its content differs from what's
supported on the current system. It may look a bit over-engineered, but
it's done this way to lower the possibility of race condition.

Resolves: rhbz#1649408

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2018-11-22 17:38:12 +01:00
Ondřej Lysoněk
1b80d4eac2 Disable KSM only once, re-enable it only on full rollback
Disabling the ksm and ksmtuned services during boot seems to cause
problems, so do it only once when the profile is first applied and
reenable the services only when full rollback is required.

Resolves: rhbz#1622239

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
2018-11-21 11:27:44 +01:00
Luiz Capitulino
d1264ba3bf tuned: use systemctl mask in KSM disable code
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>
2018-08-31 11:37:51 +02: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
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
Luiz Capitulino
03449e60f9 tuned: disable KSM in KVM low-latency profiles
KSM is enabled by default when the qemu-kvm-common-rhev package is
installed. We don't want KSM to run in KVM-RT nor cpu-partitioning
hosts, as it can cause spikes or packet drops.

This series disables KSM in those profiles when they are activated.
Likewise, we re-enable KSM when the profile is de-activated in
case it's enabled by default in systemd.

Luiz Capitulino (3):
  profiles: functions: add functions to disable/enable KSM
  realtime-virtual-host: disable KSM
  cpu-partitioning: disable KSM

 profiles/cpu-partitioning/script.sh      |  2 ++
 profiles/functions                       | 37 ++++++++++++++++++++++++++++++++
 profiles/realtime-virtual-host/script.sh |  3 +++
 3 files changed, 42 insertions(+)

--
2.9.5
Return-Path: lcapitulino@redhat.com
Received: from zmta04.collab.prod.int.phx2.redhat.com (LHLO
 zmta04.collab.prod.int.phx2.redhat.com) (10.5.81.11) by
 zmail22.collab.prod.int.phx2.redhat.com with LMTP; Tue, 3 Oct 2017 15:54:02
 -0400 (EDT)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by zmta04.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 46F2FD0310
	for <jskarvad@mail.corp.redhat.com>; Tue,  3 Oct 2017 15:54:02 -0400 (EDT)
Received: by smtp.corp.redhat.com (Postfix)
	id 3FBC860F82; Tue,  3 Oct 2017 19:54:02 +0000 (UTC)
Delivered-To: jskarvad@redhat.com
Received: from localhost (ovpn-117-159.phx2.redhat.com [10.3.117.159])
	by smtp.corp.redhat.com (Postfix) with ESMTP id 3A51A60F81;
	Tue,  3 Oct 2017 19:53:59 +0000 (UTC)
From: Luiz Capitulino <lcapitulino@redhat.com>
To: jskarvad@redhat.com
Cc: kvm-rt@redhat.com
Subject: [PATCH 1/3] profiles: functions: add functions to disable/enable KSM
Date: Tue,  3 Oct 2017 15:53:50 -0400
Message-Id: <20171003195352.22910-2-lcapitulino@redhat.com>
In-Reply-To: <20171003195352.22910-1-lcapitulino@redhat.com>
References: <20171003195352.22910-1-lcapitulino@redhat.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12

They will be used by the next commits.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-10-10 14:00:28 +02:00
Luiz Capitulino
e153bf3ba1 profiles/functions: introduce kvm modprobe file helpers
This commit introduces functions to create and delete the
kvm modprobe file used by the realtime profiles.

This is needed because the cpu-partitioning profile wants
the same modprobe file for kvm.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2017-01-10 13:47:50 +01:00
Jaroslav Škarvada
0ce452fc2e functions: used sysfs for governor switching by default
Patching of cpuspeed kept for backward compatibility.

Related: rhbz#1313489

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-11-29 16:51:37 +01:00
Jaroslav Škarvada
671cd73a57 plugin_script: stop action gets hint why it is called
Upon stop action the script is called the following way:
  script.sh stop [$HINT]

$HINT is not used if the stop is result of tuned
shutdown. $HINT is set to "profile_switch" if the stop is
result of profile switch.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-01-08 18:29:52 +01:00
Jaroslav Škarvada
239fb78992 functions: fixed restore_logs_syncing to preserve SELinux context on rsyslog.conf
Resolves: rhbz#1268901

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-10-06 11:42:46 +02:00
Jaroslav Škarvada
04c5222abc functions: fixed sysfs save to work with options
E.g.:
$ cat /sys/block/sda/queue/scheduler
noop [deadline] cfq

The 'save_sys' function needs to save 'deadline', not 'noop [deadline] cfq'.

Resolves: rhbz#1251507

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-08-21 16:33:19 +02:00
Jaroslav Škarvada
d4038a7e64 plugin_script: added support for verify
Added 'verify' shell function to the 'functions' API. This
function is optional, if defined in the script, it is called
during the verification. It's return code is checked. Function
return code '0' means verification passed, other value means
failure.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-05-19 15:51:04 +02:00
Jaroslav Škarvada
6d6d9723b6 profiles: added support for Xen VSDs
Resolves: rhbz#1159963

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-02-27 17:41:40 +01:00
Jaroslav Škarvada
59d2fac3e4 profiles: added support for direct-access storage devices (DASDs)
resolves: rhbz#1129936

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-02-27 11:55:43 +01:00
Jaroslav Škarvada
35a3eb2398 profiles: added sap profile
fixes #38

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-11-06 11:51:50 +01:00
Jaroslav Škarvada
9be76a7fa0 functions: fixed typo and bluetooth handling
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-07-24 17:50:22 +02:00
Jaroslav Škarvada
81f13e8a9c functions: silence remount errors
Some filesystems that are mounted multiple times cannot
be remounted with different options. The error may
confuse users, thus it is better to silence it.

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-07-24 17:36:39 +02:00
Jaroslav Škarvada
96572e6f83 eeepc: add support for eeepc-wmi
Patch provided by abc.mikey@gmail.com

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-07-19 14:11:56 +02:00
Jaroslav Škarvada
efac0519d7 functions: prefer transparent_hugepage over redhat_transparent_hugepage
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2013-02-19 18:25:30 +01:00
Jaroslav Škarvada
135e19f654 Use /run instead of /var/run 2012-10-25 12:05:16 +02:00
Jaroslav Škarvada
e79e3fa0db utils: tuned_powertop_profile renamed to powertop2tuned
utils: powertop2tuned changed cmdline options and several minor fixes
tuned: removed accidentaly pushed tuned-2.0/profiles/functions
tuned: some minor modifications
2012-03-30 12:33:50 +02:00
Jaroslav Škarvada
02b24196a8 profiles: removed ktune from functions
removed useless actions from functions
2012-03-28 16:39:55 +02:00
Jaroslav Škarvada
f0e955e967 profiles: added profiles converted from tuned 1.0
profiles: added powersave profile
tuned: reduced number of installed profiles, the rest are in compat subpackage
2012-03-28 15:42:56 +02:00