realtime-virtual-host: use kvm modprobe helpers
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
e153bf3ba1
commit
e25fcb3164
1 changed files with 2 additions and 18 deletions
|
|
@ -2,22 +2,8 @@
|
|||
|
||||
. /usr/lib/tuned/functions
|
||||
|
||||
modfile=/etc/modprobe.d/kvm.rt.tuned.conf
|
||||
ltanfile=/sys/module/kvm/parameters/lapic_timer_advance_ns
|
||||
|
||||
create_modfile()
|
||||
{
|
||||
modinfo -p kvm | grep -q kvmclock_periodic_sync
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "options kvm kvmclock_periodic_sync=0" > $modfile
|
||||
fi
|
||||
|
||||
modinfo -p kvm_intel | grep -q ple_gap
|
||||
if [ "$?" -eq 0 ]; then
|
||||
echo "options kvm_intel ple_gap=0" >> $modfile
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded" &&
|
||||
tuna -c "$TUNED_isolated_cores_expanded" -i
|
||||
|
|
@ -27,9 +13,7 @@ start() {
|
|||
return $retval
|
||||
fi
|
||||
|
||||
if [ ! -f $modfile ]; then
|
||||
create_modfile
|
||||
fi
|
||||
setup_kvm_mod_low_latency
|
||||
|
||||
if [ -f lapic_timer_adv_ns.cpumodel ]; then
|
||||
curmodel=`cat /proc/cpuinfo | grep "model name" | cut -f 2 -d ":" | uniq`
|
||||
|
|
@ -63,7 +47,7 @@ start() {
|
|||
}
|
||||
|
||||
stop() {
|
||||
[ "$1" = "profile_switch" ] && rm -f $modfile
|
||||
[ "$1" = "profile_switch" ] && teardown_kvm_mod_low_latency
|
||||
tuna -c "$TUNED_isolated_cores_expanded" -I &&
|
||||
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
|
||||
return "$?"
|
||||
|
|
|
|||
Loading…
Reference in a new issue