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

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