PREEMPT_RT Real-Time Patches Merge Into Mainline Linux
Announced by Linus Torvalds in September 2024 and landing in kernel 6.12, PREEMPT_RT ended nearly two decades as an out-of-tree patchset — real-time Linux no longer needs a custom kernel build.
PREEMPT_RT, the real-time preemption patchset for Linux, was fully merged into mainline on September 20, 2024, enabled for x86, x86_64, ARM64, and RISC-V — making kernel 6.12 the first mainline release with genuine, built-in real-time capability.
Nearly twenty years as an out-of-tree patch
PREEMPT_RT had been in development since 2005, maintained as a separate patchset applied on top of stable kernel releases — reducing unbounded latencies in kernel code paths to make Linux usable for hard real-time workloads (industrial control, robotics, audio production) where a late response isn’t just slow, it’s a correctness failure. For nearly two decades, using it meant tracking and applying that patchset yourself, on top of whatever kernel version you were running.
What finally unblocked the merge
The last significant blocker was reworking the kernel’s printk logging facility to be safely preemptible — a genuinely hard problem, since kernel logging happens from contexts where you can’t simply wait for a lock. Once that landed, the remaining pieces of PREEMPT_RT could merge cleanly. Torvalds announced the milestone at the Open Source Summit Europe in September 2024.
What “in mainline” actually changes
With PREEMPT_RT merged, any standard Linux distribution kernel on a supported architecture can be switched between non-real-time, soft real-time, and hard real-time behavior — a runtime or build-time choice, not a requirement to track a separately-maintained fork. This directly benefits the same containerized, cloud-native infrastructure covered elsewhere on this blog, where predictable latency increasingly matters for control-plane and edge workloads, not just traditional industrial use cases.
Why this took so long, and why that’s not surprising
Real-time guarantees require correctness properties (bounded worst-case latency) that are much harder to verify than typical kernel features, and PREEMPT_RT’s changes touched extremely sensitive, easy-to-regress parts of the kernel — locking primitives, interrupt handling, the scheduler itself. A patchset this invasive, kept out-of-tree and continuously rebased against a moving target for two decades, represents an unusually large sustained engineering effort by the real-time Linux community before mainline maintainers were satisfied it could merge safely.
Sources: Real-Time “PREEMPT_RT” Support Merged For Linux 6.12 — Phoronix, PREEMPT_RT — Wikipedia, Linux Can Now Power Real-Time Operating Systems — Hackster.io