Actually limit the % RT time

starter.sh runs as lvuser, which doesn't have enough permission.
starter runs using the suid bit, and runs as admin.  Do it there
instead.

Change-Id: Ie3296960ecd4889fa0dc19ab38e65597c4b7b426
diff --git a/aos/starter/starter.cc b/aos/starter/starter.cc
index 501530c..4bfb3d2 100644
--- a/aos/starter/starter.cc
+++ b/aos/starter/starter.cc
@@ -751,6 +751,13 @@
   // This is in here instead of starter.sh because starter.sh doesn't run with
   // permissions on a roboRIO.
   AOS_CHECK(system("echo 0 > /proc/sys/vm/overcommit_memory") == 0);
+
+  // Configure throttling so we reserve 5% of the CPU for non-rt work.
+  // This makes things significantly more stable when work explodes.
+  // This is in here instead of starter.sh for the same reasons, starter is suid
+  // and runs as admin, so this actually works.
+  AOS_CHECK(system("/sbin/sysctl -w kernel.sched_rt_period_us=1000000") == 0);
+  AOS_CHECK(system("/sbin/sysctl -w kernel.sched_rt_runtime_us=950000") == 0);
 #endif
 
   libevent_base = EventBaseUniquePtr(event_base_new());