Blame SOURCES/tuned-2.11.0-realtime-virtual-profiles-enable-ktimer-lockless-check.patch

46c77c
diff --git a/profiles/realtime-virtual-guest/script.sh b/profiles/realtime-virtual-guest/script.sh
46c77c
index 33cb730..ce94a4b 100755
46c77c
--- a/profiles/realtime-virtual-guest/script.sh
46c77c
+++ b/profiles/realtime-virtual-guest/script.sh
46c77c
@@ -2,8 +2,13 @@
46c77c
 
46c77c
 . /usr/lib/tuned/functions
46c77c
 
46c77c
+KTIMER_LOCKLESS_FILE=/sys/kernel/ktimer_lockless_check
46c77c
+
46c77c
 start() {
46c77c
     systemctl start rt-entsk
46c77c
+    if [ -f $KTIMER_LOCKLESS_FILE ]; then
46c77c
+        echo 1 > $KTIMER_LOCKLESS_FILE
46c77c
+    fi
46c77c
     return "$?"
46c77c
 }
46c77c
 
46c77c
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh
46c77c
index 8ff5509..be1804f 100755
46c77c
--- a/profiles/realtime-virtual-host/script.sh
46c77c
+++ b/profiles/realtime-virtual-host/script.sh
46c77c
@@ -5,6 +5,7 @@
46c77c
 CACHE_VALUE_FILE=./lapic_timer_adv_ns
46c77c
 CACHE_CPU_FILE=./lapic_timer_adv_ns.cpumodel
46c77c
 KVM_LAPIC_FILE=/sys/module/kvm/parameters/lapic_timer_advance_ns
46c77c
+KTIMER_LOCKLESS_FILE=/sys/kernel/ktimer_lockless_check
46c77c
 QEMU=$(type -P qemu-kvm || echo /usr/libexec/qemu-kvm)
46c77c
 TSCDEADLINE_LATENCY="/usr/share/qemu-kvm/tscdeadline_latency.flat"
46c77c
 if [ ! -f "$TSCDEADLINE_LATENCY" ]; then
46c77c
@@ -100,6 +101,10 @@ start() {
46c77c
     fi
46c77c
     systemctl start rt-entsk
46c77c
 
46c77c
+    if [ -f $KTIMER_LOCKLESS_FILE ]; then
46c77c
+        echo 1 > $KTIMER_LOCKLESS_FILE
46c77c
+    fi
46c77c
+
46c77c
     return 0
46c77c
 }
46c77c