1
0
Fork 0
Commit graph

21 commits

Author SHA1 Message Date
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