Unblocking the softirq lock for PREEMPT_RT
summary
Claims that the global local-BH disable on PREEMPT_RT behaves like a per-CPU Big Kernel Lock and blocks higher-priority threads; offers a proof-of-concept that replaces global BH serialization with targeted protection around PCPU resources using lo_nested_bh and compiler scope guard helpers. Uses SKB/page-pool examples, SK Switz tracer prints, and driver patches; changes timer setup to avoid pinning. Prototype covers ~90% of observed cases, lands driver fixes for a few broken drivers, and demonstrates preemption between networking and block paths working as intended.
AI-written summary · about
chapters (21)
- 0:00Introduction to softirq problem
- 0:23Softirq on RT vs non-RT kernels
- 3:56Problem with long-running softirqs
- 5:22Proof of concept for local locks
- 7:47Guard notation for locking
- 10:19BPF and driver locking issues
- 11:23Test case before and after
- 12:06Networking timer special case
- 13:32Page pool safety in softirq
- 14:22Need for protection scope identification
- 16:08Softirq scheduling control issues
- 17:56Local locks vs preempt disable
- 19:58Breaking up the big lock
- 21:43PPU variables and pin timer
- 23:07Guard implementation details
- 24:35Driver patch consolidation
- 26:21Timer setup patch heads-up
- 27:03Scope guard vs guard notation
- 28:30BPF lock handling in redirect
- 30:20Refactoring XDP drivers
- 30:41Q&A and summary
related talks
34mWhat's new in the BPF world?
30mCilium's BPF kernel datapath revamped
17mSBB: Eliminating Centralized Bottlenecks in Userspace Network Runtime
16mPeeR: First-Class Scheduling for Latency-Critical eBPF Applications
32meBPF: BPF kernel infrastructure
22mHodor: Intra-Process Isolation for High-Throughput Data Plane Libraries
32mMPTCP: Extending kernel functionality with eBPF and Netlink
32mOverview of the BPF networking hooks and user experience in Meta
