~/talk

Building a Lock-free Multi-producer, Multi-consumer Queue for Tcmalloc

Talkat CppCon 2021 · on Wednesday, 2021-10-27· at 14:00· B) Summit 8/9, online· [security]
links:none on file
slides:none on file

Built a lock‑free MPMC queue to replace the mutexed transfer cache inside tcmalloc, using atomics, widened counters to mitigate ABA, unit tests, fuzzing and sanitizers, microbenchmarks and futex wait/wake for low‑overhead sleeping. Microbenchmarks show up to ~2× throughput at high contention but an early integration shows a 17% web‑search slowdown until futex and sniffing fixes reduce impact; a one‑in‑a‑thousand data race surfaces during fuzzing and is fixed before landing.

AI-written summary · about

  1. 0:00Intro
  2. 1:50CppCon Talk
  3. 7:12Transfer Cache
  4. 9:27Standard Queue
  5. 11:34Claim Insert
  6. 14:32Commit Line
  7. 16:05Tcmalloc Optimization
  8. 17:59Whitebox Testing
  9. 20:54Testing
  10. 22:47Debugging
  11. 26:52ABA Bug
  12. 28:07Benchmarks
  13. 30:01Artificial Benchmarks
  14. 32:55Stat Counters
  15. 35:34Futex
  16. 43:12Web Search
  17. 45:15Concurrent Data Structure
  18. 46:49Existing Solutions
  19. 48:31Question
  20. 52:41Micro benchmarks
  21. 53:38Mutex under contention
  22. 57:15Balancing in the background
  23. 58:25Getting to the online audience
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.