diff options
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index 204b547..1a526e0 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -46,6 +46,16 @@ isolate_cpu1() { exit 1 fi + # Remove governor's background timers, i.e. use performance governor + if [ -d /sys/devices/system/cpu/cpu$ISOL_CPU/cpufreq ]; then + echo performance > /sys/devices/system/cpu/cpu$ISOL_CPU/cpufreq/scaling_governor + fi + + # Affine all irqs to CPU0 + for i in `find /proc/irq/* -name smp_affinity`; do + echo 1 > $i > /dev/null; + done + # Try to disable sched_tick_max_deferment if [ -d /sys/kernel/debug -a -f /sys/kernel/debug/sched_tick_max_deferment ]; then echo -1 > /sys/kernel/debug/sched_tick_max_deferment |