OPPO Kernel Craftsman
May 26, 2023 · Fundamentals
Understanding Linux rwsem Read‑Write Semaphore in Kernel 5.15.81
Linux introduced the read‑write semaphore (rwsem) as a sleep lock that lets multiple readers hold the lock concurrently, improving read‑heavy workload performance, and the article details its internal state representation, acquisition paths for reads and writes, optimistic spinning, handoff mechanisms, and trade‑offs, noting that mobile kernels may need further tuning.
Linux kernelSynchronizationconcurrency
0 likes · 22 min read