PREEMPT_RT - how not to break it.
summary
Printk and console output can block interrupts long enough to kill RT goals: 20 characters ≈ 0.5 ms printing so the kernel needs a way to log without disabling IRQs. Waking many tasks or queuing lots of work produces huge tails — 100 wakes → 26 µs, 500 → 75 µs, 5,000 → >4 ms latency. Raw spinlock contention across many CPUs hands locks around and delays worst-case CPUs — raw spinlock handover delays. Avoid long atomic/IRQ-disabled regions, anonymous semaphores, and untracked workqueues; use RT-aware primitives, affinity or offload, and priority inheritance where supported.
AI-written summary · about
chapters (19)
- 0:00Introduction to PREEMPT_RT
- 8:34Locking scope and usage
- 15:47Log ordering and printk challenges
- 21:28Console printing latency issues
- 23:42Long computations and list processing
- 24:26Contended raw spin locks impact
- 25:09Task wake-up latency with nanosleep
- 26:40Priority inheritance in RT
- 28:50Lock types and owner tracking
- 30:37Userland priority boosting
- 31:19Soft IRQ and CPU affinity issues
- 33:08Deferred work with disabled interrupts
- 33:51Tasklets vs. soft IRQ for latency
- 34:33Workqueues and anonymous work
- 35:15TTY layer worker queue problems
- 36:18Common pitfalls breaking RT
- 37:26New primitives and synchronization
- 38:08Summary and closing remarks
- 38:33Q&A on PREEMPT_RT patches
related talks
53mPREEMPT_RT - How Not to Break It.
53mPREEMPT_RT - How Not to Break It.
47mWhat Every Driver Developer Should Know about RT
50mInside the RT Patch
47mReal-Time Linux: What Is Next?
01h 08mRT Linux in Safety Critical Systems: the potential and the challenges
33mQ&A about Preempt RT
26mReal-time Linux: what is next?
