nerves-project / nerves_system_rpi4

Base Nerves system configuration for the Raspberry Pi 4
Apache License 2.0
91 stars 49 forks source link

linux: enable PREEMPT_RT #257

Closed fhunleth closed 3 days ago

fhunleth commented 1 month ago

This updates the Linux kernel, includes the real-time patch set, and enables PREEMPT_RT..

ConnorRigby commented 1 month ago

I'm not fully sure how the preempt_rt system works, does this effectively do nothing without configuration giving it the ability to be used, or is there some other tradeoff being made here?

fhunleth commented 1 month ago

@ConnorRigby Yeah, this is a really good question. I was highly skeptical. I was shown some stats today that GPIO interrupt response time in Nerves improves by at least a factor of 10 with the rt patch enabled. The data is pretty convincing. I'm still going to keep this PR unmerged until I get back and can repeat the tests. Given that my assumptions on Linux interrupt latency appear to be clearly wrong, I'm also planning on revisiting Circuits.GPIO decisions. If all this appears to be the case, then Nerves can to be used in situations with much tighter deadlines than I've been telling people and that would be quite interesting.