Locking in WebKit | WebKit
We recently replaced all spinlocks, OS-provided mutexes, and condition variables in WebKit with the new WTF::Lock and WTF::Condition — these new primitives have some cool properties.
Locking in WebKit May 6, 2016 by Filip Pizlo @filpizlo Back in August 2015 we replaced all spinlocks and OS-provided mutexes in WebKit with the new WTF::Lock (WTF stands for Web Template Framework). We also replaced all OS-provided condition variables with WTF::Condition . These new primitives have some cool properties: WTF::Lock and WTF::Condition only require one byte of storage each. WTF::Lock only needs two bits in that byte. The small size encourages using huge numbers of very fine-grained locks. OS mutexes often require 64 bytes or more. The small size of WTF::Lock means that there’
Explore this link on the map →saved by
related reading
- Unreliable Guide To Locking — The Linux Kernel documentationdocs.kernel.org
- Spinlocks Considered Harmfulmatklad.github.io
- Measuring Mutexes, Spinlocks and how Bad the Linux Scheduler Really is | Probably Danceprobablydance.com
- abseil / Performance Hintsabseil.io
- Non-blocking algorithm - Wikipediaen.wikipedia.org
- PEP 703 – Making the Global Interpreter Lock Optional in CPython | peps.python.orgpeps.python.org
- LittleBookOfSemaphores.pdfgreenteapress.com
- Reading 16: Mutual Exclusionweb.mit.edu
- Zaval.org -> Resources -> Library -> Recursive mutexes by David Butenhofzaval.org
- How to do distributed locking - Martin Kleppmann's blogmartin.kleppmann.com
- Swift Concurrency Waits for No Onesaagarjha.com
- A locking war story | Sentry Blogsentry.engineering