Blame SOURCES/tuned-2.5.1-find-lapictscdeadline-optimal-fix.patch

7438d5
From 874762b4c06e3bc7862e119ee12a23a16352f649 Mon Sep 17 00:00:00 2001
7438d5
From: Marcelo Tosatti <mtosatti@redhat.com>
7438d5
Date: Wed, 30 Sep 2015 18:33:47 -0300
7438d5
Subject: [PATCH] tuned-profiles-nfv: fix find-lapictscdeadline-optimal.sh for
7438d5
 CPUS where ns > 6500
7438d5
7438d5
If the result of lapic-tsc-deadline kvm-unit-test continues
7438d5
to decrease as ns increases, then use highest ns value.
7438d5
7438d5
Reported and tested by Luiz and Hai.
7438d5
7438d5
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
7438d5
Resolves: rhbz#1267284
7438d5
---
7438d5
 profiles/realtime-virtual-host/find-lapictscdeadline-optimal.sh | 6 ++++++
7438d5
 1 file changed, 6 insertions(+)
7438d5
7438d5
diff --git a/profiles/realtime-virtual-host/find-lapictscdeadline-optimal.sh b/profiles/realtime-virtual-host/find-lapictscdeadline-optimal.sh
7438d5
index d858eb6..539c47e 100755
7438d5
--- a/profiles/realtime-virtual-host/find-lapictscdeadline-optimal.sh
7438d5
+++ b/profiles/realtime-virtual-host/find-lapictscdeadline-optimal.sh
7438d5
@@ -20,5 +20,11 @@ for i in `seq 1 $lines`; do
7438d5
 	fi
7438d5
 	prev_value=$a
7438d5
 done
7438d5
+# if still decreasing, then use highest ns value
7438d5
+if [ $value -le 99 ]; then
7438d5
+	echo -n "optimal value for lapic_timer_advance_ns is: "
7438d5
+	awk "NR==$(($i - 1))" $1 | cut -f 1 -d ":"
7438d5
+	exit 0
7438d5
+fi
7438d5
 echo optimal not found
7438d5
 exit 1
7438d5
-- 
7438d5
2.4.3
7438d5