Modernizing Vmalloc With Maple Tree: Design, Challenges, and Trade Offs
summary
Migration replaces rb-tree vmalloc indexing with Maple Tree, removes augmented subtree callbacks, and shrinks vm_area metadata from ~72 to ~48 bytes delivering 33% metadata savings per allocation. Per-shard and per-CPU preallocated pools avoid global lookups for small allocations. Benchmarks show better SMP scaling as concurrency rises, with improvements growing from ~29% to up to 63% scaling gain on heavy parallel allocations; an RCU read-side design promises larger gains.
AI-written summary · about
chapters (27)
- 0:00Introduction and speaker background
- 1:04What is vmalloc in Linux
- 2:08Motivation for redesigning vmalloc
- 3:10Kernel memory allocators overview
- 5:18Per-CPU data fundamentals
- 6:20kmalloc vs vmalloc differences
- 7:23vmap structure deep dive
- 8:46vmalloc internal allocation flow
- 10:52Why modernization matters now
- 11:33Maple tree advantages explained
- 14:03Red-black tree limitations
- 16:32Maple tree RCU support
- 17:57Maple tree structure overview
- 19:22Maple tree cursor benefits
- 20:24VMA migration to Maple tree precedent
- 21:04High-level vmalloc design changes
- 23:34Migration implementation details
- 25:17Memory savings per allocation
- 26:43Lazy release and recovery path
- 27:47Per-CPU allocator optimization
- 28:33Testing on Qualcomm Snapdragon
- 29:59Benchmarking results overview
- 31:02Concurrency scaling improvements
- 32:27Future RCU-based Maple tree migration
- 33:10Lessons learned and next steps
- 35:18Learning to choose Maple tree candidates
- 37:27Q&A session begins
