tuned(8) realtime-virtual-{host|guest} profiles set Kernel and
KVM module parameters via script.sh plugin. These parameters are
to be verified in a verify() function, invoked by tuned-adm verify
command.
This patch updates verify() functions to validate KVM module
parameters.
It moves kernel parameters to the tuned.conf file under the
[sysfs] & [sysctl] plugin sections. And removes call to
disable_ksm function, no longer required.
Fixes: RHBZ#1947858
42 lines
1 KiB
Bash
Executable file
42 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
. /usr/lib/tuned/functions
|
|
|
|
start() {
|
|
setup_kvm_mod_low_latency
|
|
return 0
|
|
}
|
|
|
|
stop() {
|
|
if [ "$1" = "full_rollback" ]; then
|
|
teardown_kvm_mod_low_latency
|
|
fi
|
|
return "$?"
|
|
}
|
|
|
|
verify() {
|
|
retval=0
|
|
|
|
# set via /etc/modprobe.d/kvm.conf and /etc/modprobe.d/kvm.rt.tuned.conf
|
|
if [ -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
|
|
kps=$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)
|
|
if [ "$kps" = "N" -o "$kps" = "0" ]; then
|
|
echo " kvmclock_periodic_sync:($kps): disabled: okay"
|
|
else
|
|
echo " kvmclock_periodic_sync:($kps): enabled: expected N(0)"
|
|
retval=1
|
|
fi
|
|
fi
|
|
if [ -f /sys/module/kvm_intel/parameters/ple_gap ]; then
|
|
ple_gap=$(cat /sys/module/kvm_intel/parameters/ple_gap)
|
|
if [ $ple_gap -eq 0 ]; then
|
|
echo " ple_gap:($ple_gap): disabled: okay"
|
|
else
|
|
echo " ple_gap:($ple_gap): enabled: expected 0"
|
|
retval=1
|
|
fi
|
|
fi
|
|
return $retval
|
|
}
|
|
|
|
process $@
|