/usr/lib/tuned/realtime-virtual-host/run-tscdeadline-latency.sh is in tuned 2.9.0-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/bin/bash
QEMU=/usr/libexec/qemu-kvm
if [ ! -f /sys/module/kvm/parameters/lapic_timer_advance_ns ]; then
echo "/sys/module/kvm/parameters/lapic_timer_advance_ns not found"
exit 1
fi
dir=`mktemp -d`
for i in `seq 1000 500 7000`; do
echo $i > /sys/module/kvm/parameters/lapic_timer_advance_ns
chrt -f 1 taskset -c $1 $QEMU -enable-kvm -device pc-testdev \
-device isa-debug-exit,iobase=0xf4,iosize=0x4 \
-display none -serial stdio -device pci-testdev \
-kernel /usr/share/qemu-kvm/tscdeadline_latency.flat \
-cpu host | grep latency | cut -f 2 -d ":" > $dir/out
A=0
while read l; do
A=$(($A+$l))
done < $dir/out
lines=`wc -l $dir/out | cut -f 1 -d " "`; ans=$(($A/$lines));
echo $i: $ans
done
|