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

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