Blame SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch

8dde4c
From 837c6bd12a5eedc3fbf46291bf1040e724786efd Mon Sep 17 00:00:00 2001
8dde4c
From: Marcelo Tosatti <mtosatti@redhat.com>
8dde4c
Date: Fri, 31 Aug 2018 13:27:12 +0200
8dde4c
Subject: [PATCH] start/stop rt-entsk daemon on initialization/shutdown
8dde4c
MIME-Version: 1.0
8dde4c
Content-Type: text/plain; charset=UTF-8
8dde4c
Content-Transfer-Encoding: 8bit
8dde4c
8dde4c
The rt-entsk application, part of newer rt-setup packages,
8dde4c
worksaround a latency issue with static key
8dde4c
IPI's. What it does it:
8dde4c
8dde4c
/*
8dde4c
 * Open a socket, and enable timestamping on it.
8dde4c
 *
8dde4c
 * This is to avoid Chrony from changing timestamping
8dde4c
 * user count from 0->1 and vice-versa, causing
8dde4c
 * static key enable/disable IPIs.
8dde4c
 *
8dde4c
 */
8dde4c
8dde4c
Start/stop the systemctl service from the realtime-virtual-host
8dde4c
and realtime-virtual-guest profiles.
8dde4c
8dde4c
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
8dde4c
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
8dde4c
---
8dde4c
 profiles/realtime-virtual-guest/script.sh  | 19 +++++++++++++++++++
8dde4c
 profiles/realtime-virtual-guest/tuned.conf |  3 +++
8dde4c
 profiles/realtime-virtual-host/script.sh   |  2 ++
8dde4c
 3 files changed, 24 insertions(+)
8dde4c
 create mode 100755 profiles/realtime-virtual-guest/script.sh
8dde4c
8dde4c
diff --git a/profiles/realtime-virtual-guest/script.sh b/profiles/realtime-virtual-guest/script.sh
8dde4c
new file mode 100755
8dde4c
index 0000000..33cb730
8dde4c
--- /dev/null
8dde4c
+++ b/profiles/realtime-virtual-guest/script.sh
8dde4c
@@ -0,0 +1,19 @@
8dde4c
+#!/bin/sh
8dde4c
+
8dde4c
+. /usr/lib/tuned/functions
8dde4c
+
8dde4c
+start() {
8dde4c
+    systemctl start rt-entsk
8dde4c
+    return "$?"
8dde4c
+}
8dde4c
+
8dde4c
+stop() {
8dde4c
+    systemctl stop rt-entsk
8dde4c
+    return "$?"
8dde4c
+}
8dde4c
+
8dde4c
+verify() {
8dde4c
+    return "$?"
8dde4c
+}
8dde4c
+
8dde4c
+process $@
8dde4c
diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf
8dde4c
index fb2bc42..8e1f67e 100644
8dde4c
--- a/profiles/realtime-virtual-guest/tuned.conf
8dde4c
+++ b/profiles/realtime-virtual-guest/tuned.conf
8dde4c
@@ -36,5 +36,8 @@ group.ktimersoftd=0:f:3:*:ktimersoftd.*
8dde4c
 
8dde4c
 ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
8dde4c
 
8dde4c
+[script]
8dde4c
+script=${i:PROFILE_DIR}/script.sh
8dde4c
+
8dde4c
 [bootloader]
8dde4c
 cmdline_rvg=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores}
8dde4c
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh
8dde4c
index 515d254..a9366cb 100755
8dde4c
--- a/profiles/realtime-virtual-host/script.sh
8dde4c
+++ b/profiles/realtime-virtual-host/script.sh
8dde4c
@@ -87,6 +87,7 @@ start() {
8dde4c
     if [ -f $CACHE_VALUE_FILE ]; then
8dde4c
         echo `cat $CACHE_VALUE_FILE` > $KVM_LAPIC_FILE
8dde4c
     fi
8dde4c
+    systemctl start rt-entsk
8dde4c
 
8dde4c
     return 0
8dde4c
 }
8dde4c
@@ -94,6 +95,7 @@ start() {
8dde4c
 stop() {
8dde4c
     [ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency
8dde4c
     enable_ksm
8dde4c
+    systemctl stop rt-entsk
8dde4c
     return "$?"
8dde4c
 }
8dde4c
 
8dde4c
-- 
8dde4c
2.14.4
8dde4c