PREEMPT_RT
实时内核补丁AdvancedA real-time patch set that makes the Linux kernel almost fully preemptible, cutting worst-case latency.
PREEMPT_RT is a real-time patch set maintained for years by the Linux community. It converts most of the kernel's non-interruptible code paths into preemptible ones, turns interrupt handlers into threads, and replaces spinlocks with sleepable mutexes, pushing the worst-case response latency for high-priority tasks down to roughly tens of microseconds. It was merged into the mainline kernel in 2024 (version 6.12); before that, it had to be patched in and compiled by hand. Robot control needs to send commands on time, every cycle — a stock kernel's occasional multi-millisecond stall can make a motor jitter or trip a safety cutoff — so tools like ros2_control, EtherCAT masters, and Franka's libfranka typically require or recommend a real-time kernel.
ExampleBefore controlling a Franka arm at 1 kHz with libfranka, install a PREEMPT_RT kernel on Ubuntu first, or communication timeout errors are likely.
- Also called
- PREEMPT_RT real-time Linux patch, RT-Linux, real-time Linux
- Related
- Real-Time Operating System (RTOS) · Hard Real-Time · Real-Time Control · Jitter (Timing Jitter) · EtherCAT Master (SOEM / IgH) · Xenomai
- Sources
- Real-Time Linux (Linux Foundation Wiki)
- As of
- 2024-11