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