Skip to content

Commit

Permalink
Allow for more kernel book-keeping budget.
Browse files Browse the repository at this point in the history
Looke like modern kernels starve earlier if not given enough
time to escape from realtime tasks. Increase the 1ms allowed budget
to 10ms, which should still be under a visible threshold.
  • Loading branch information
hzeller committed Aug 19, 2024
1 parent b0508fc commit f55736f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gpio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ static void DisableRealtimeThrottling() {
if (GetNumCores() == 1) return; // Not safe if we don't have > 1 core.
// We need to leave the kernel a little bit of time, as it does not like
// us to hog the kernel solidly. The default of 950000 leaves 50ms that
// can generate visible flicker, so we reduce that to 1ms.
WriteTo("/proc/sys/kernel/sched_rt_runtime_us", "999000");
// can generate visible flicker, so we reduce that to 10ms.
WriteTo("/proc/sys/kernel/sched_rt_runtime_us", "990000");
}

bool Timers::Init() {
Expand Down

0 comments on commit f55736f

Please sign in to comment.