PREEMPT_RT - How Not to Break It.
summary
PREEMPT_RT is almost mainlined on x86 but merging exposes real problems: many spinlocks become sleeping locks so locking semantics change, threaded IRQs become default, and a global softirq/bottom-half lock creates multi-millisecond stalls. Concrete fixes include rt_spinlock_t changes with auto-preempt, moving HR timers into softirq context, RCU boost and per-resource softirq locks, and priority inheritance for mutexes. Repro cases show clock_nanosleep wake latency rising from ~26 µs at 100 tasks to ~4 ms at 5,000 tasks. Use tracing and rtla tracing tool plus cyclictest to find root causes.
AI-written summary · about
chapters (17)
- 0:00Motivation for RT Mainlining
- 1:08Locking mechanisms in RT
- 4:37Interrupt and softirq handling
- 7:48Timer and wakeup adjustments
- 9:21Interrupt work and printk
- 10:51RCU callback management
- 12:14Solving atomic context issues
- 15:34Lock ordering and primitives
- 17:30Debugging kernel warnings
- 19:08Memory allocation constraints
- 20:40Console printing and latency
- 23:32System latency analysis
- 27:42Using RTLA for debugging
- 29:01Priority inheritance
- 34:05Softirq resource protection
- 37:49Context and task worker issues
- 39:12Best practices and Q&A
related talks
53mPREEMPT_RT - How Not to Break It.
46mPREEMPT_RT - how not to break it.
50mInside the RT Patch
47mReal-Time Linux: What Is Next?
24mPREEMPT_RT Q&A with tglx
36mJourney of improving RT performance on Single CPU equipped PREEMPT_RT Linux
38mNews from PREEMPT_RT
47mWhat Every Driver Developer Should Know about RT
