diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-04-24 11:28:45 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2014-04-24 14:48:07 +0530 |
commit | 9ab4e6a7e1c25b89cb756af5a206b8aec1c04707 (patch) | |
tree | 37f3ae04688e1c6ef1ca9109509f6963896b490a | |
parent | bab7e311f16aa3f735cbdf66d7008c4a25d8d593 (diff) |
is-cpu-isolated.sh: offload irqs and change cpufreq governor
Change-Id: I56a9c51a0c61ec338ece94041b94ab643efb7285
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-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 |