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

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