Published September 7, 2026 | Version v3

Enhanced Passive Reader-Writer (EPRW) Locks for Userspace Poll-Mode Datapaths

  • 1. Versa Networks

Description

Passive reader-writer locks (PRW locks), introduced by Liu, Zhang, and Chen (USENIX ATC’14), achieve

excellent read-path scalability by avoiding atomic operations on the reader fast path. The original algorithm was

designed for OS kernel environments where inter-processor interrupts (IPIs) are available: when a writer advances

the global version, it sends IPIs to any cores whose per-core version counters have not yet caught up, and those

cores update their versions immediately in the IPI handler. Adapting the PRW lock to userspace eliminates this

mechanism. Without IPIs, every thread within the lock’s registered scope—including threads that are entirely

idle with no pending lock operation—must proactively call a heartbeat function to advance its version counter or

risk blocking writers indefinitely. In poll-mode packet processing environments such as DPDK, where lcores run

tight, deterministic forwarding loops, this obligation is both pervasive and fundamentally incompatible with lcore

programming discipline.

 

We present the Enhanced Passive Reader-Writer (EPRW) lock, an adaptation of the PRW lock for userspace

poll-mode datapaths that eliminates the heartbeat requirement entirely. We prove the correctness of the EPRW

lock, analyze its memory ordering requirements, and demonstrate that it preserves all progress guarantees of the

original algorithm while adding support for lock upgrade, downgrade, and non-blocking acquisition—operations

absent from the original design and necessary for production userspace use.

Copyright Notice © 2026 Versa Networks. All rights reserved. 

Files

eprw_preprint.pdf

Files (731.6 kB)

Name Size Download all
md5:48cb71d733da9bda66e7c66403a852cd
731.6 kB Preview Download

Additional details

Dates

Submitted
2026-07-11

References

  • Ran Liu, Heng Zhang, and Haibo Chen. Scalable read-mostly synchronization using passive reader-writer locks. In Proceedings of the USENIX Annual Technical Conference (USENIX ATC), 2014.
  • DPDK: Data plane development kit. https://www.dpdk.org
  • Paul E. McKenney and John D. Slingwine. Read-copy update: Using execution history to solve concurrency problems. In Proceedings of the International Conference on Parallel and Distributed Computing and Systems (PDCS'98), pages 509–518, 1998.
  • Jonathan Corbet. Sequence locks. Linux Weekly News, https://lwn.net/Articles/22818/, 2003.
  • Alex Kogan, Dave Dice, and Shaz Qadeer. The BRAVO algorithm: Biased locking for reader-writer locks. In Proceedings of the 14th EuroSys Conference (EuroSys'19), Dresden, Germany, March 2019. ACM.
  • Dave Dice, Virendra J. Marathe, and Nir Shavit. Flat combining and the synchronization-parallelism tradeoff. In Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA'10), pages 355–364. ACM, 2010.
  • John M. Mellor-Crummey and Michael L. Scott. Algorithms for scalable synchronization on shared-memory multiprocessors. ACM Transactions on Computer Systems, 9(1):21–65, 1991.
  • Dave Dice and Nir Shavit. TLRW: Return of the read-write lock. In Proceedings of the 22nd ACM Symposium on Parallelism in Algorithms and Architectures (SPAA'10), pages 309–317. ACM, 2010.