3 ms·
There's a patch set for the kernel called PREEMPT_RT: https://wiki.linuxfoundation.org/realtime/start https://wiki.linuxfoundation.org/realtime/start It conta
by l1k 9y ago
There's a patch set for the kernel called PREEMPT_RT:
https://wiki.linuxfoundation.org/realtime/start https://wiki.linuxfoundation.org/realtime/start
It contains patches to get latencies down and touches numerous subsystems of the kernel. Most importantly, interrupt handlers become preemptible. (Normally interrupts are executed in "atomic context", i.e. they cannot be preempted. This also means e.g. that you can't sleep in an interrupt handler because the timer interrupt is disregarded. With PREEMPT_RT_FULL, interrupts are executed in "process context", i.e. as normal kernel threads which can be interrupted.)
We use the kernel branch of the Foundation (which contains a ton of patches required for hardware support of the Raspberry Pi), cherry-pick the realtime patch set on top, then apply three custom patches, one is a fix to make the USB driver's interrupt handler preemptible. The result is this branch:
https://github.com/RevolutionPi/linux/commits/revpi-4.4 https://github.com/RevolutionPi/linux/commits/revpi-4.4