commit | d9f6d81cc9f61475e2de283c8fb66b9f073aac11 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Sat Oct 10 17:49:07 2020 -0700 |
committer | Austin Schuh <austin.linux@gmail.com> | Sat Oct 10 21:17:58 2020 -0700 |
tree | e115e16a00f40b7e2d710d3f9a0bed3303687798 | |
parent | 54b1db6c4bd1d3e53289a8c2961f05c59849c59c [diff] |
Configure RT throttling The roboRIO would allow us to spin the whole CPU at RT priority and take everything down. Disable that behavior. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/real_time_throttling Change-Id: I30efc000f7a8023d291e8649e0713c4cc86352b7
diff --git a/aos/starter/starter.sh b/aos/starter/starter.sh index e140351..87f58a4 100755 --- a/aos/starter/starter.sh +++ b/aos/starter/starter.sh
@@ -4,6 +4,11 @@ if [[ "$(hostname)" == "roboRIO"* ]]; then ROBOT_CODE="/home/admin/robot_code" + # Configure throttling so we reserve 5% of the CPU for non-rt work. + # This makes things significantly more stable. + echo 950000 > /proc/sys/kernel/sched_rt_runtime_us + echo 1000000 > /proc/sys/kernel/sched_rt_period_us + ln -s /var/local/natinst/log/FRC_UserProgram.log /tmp/FRC_UserProgram.log ln -s /var/local/natinst/log/FRC_UserProgram.log "${ROBOT_CODE}/FRC_UserProgram.log" elif [[ "$(hostname)" == "pi-"* ]]; then