model-writtenrun 4870 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund opened the thread after slab greatly reduced memory overhead but made his radix-tree workload much slower, identifying repeated block initialization, expensive chunk-index division, and frequent block-list movement as major costs #1.
- Tomas Vondra supported caching empty blocks and grouping blocks by ranges of free-chunk counts, while warning that high-watermark-based retention and growing block sizes could waste memory after unusually large transactions #3 #5.
- Andres proposed tracking never-used chunks separately to avoid eagerly initializing every free-list entry, combined this with bounded block lists, and reported allocation performance approaching AllocSet before posting the initial two-patch series #4 #6 #7 #9.
- Ranier Vilela suggested changing malloc-success branching in the companion AllocSet patch, while David Rowley preferred unlikely(); this discussion concerned the hot/cold-path work rather than the slab change eventually committed here #10 #11 #12.
- Tomas added FIFO, LIFO, and random-allocation benchmarks and found substantial improvements alongside some regressions; switching to microsecond timing changed some results, and further investigation showed that prior backend activity and page faults strongly affected measurements #13 #16 #17.
- After more than a year, David revived the slab patch, adapted it to current memory-context infrastructure, changed free-list links to 32-bit offsets, and measured runtimes around 60% of unpatched master #18.
- John Naylor proposed simpler block-list indexing, but David explained that it would lose the intended grouping by fullness; subsequent microbenchmarks showed little difference between the viable arithmetic alternatives #19 #20 #21.
- Robert Haas distinguished ordinary cold-cache costs from potentially concerning dependence on allocator history, helping frame the earlier benchmark uncertainty #22.
- David substantially reworked the slab implementation to favor previously freed chunks, retain reusable empty-block state, use counted empty-block lists, reduce block-list buckets, and improve accounting and diagnostics, while restoring pointer-based free-list links #23.
- John's radix-tree tests confirmed faster allocation but initially suggested slower freeing; David investigated cache effects, and John's longer reruns showed approximately a 5% overall improvement with freeing behavior no longer anomalous #24 #25 #26.
- David's final submission strengthened consistency checks and supplied broader benchmarks using palloc0 and touching memory before freeing it; he reported no regression across the tested FIFO, LIFO, and partially randomized workloads, and John repeated his earlier test successfully before the commit #27 #28.
- David committed the slab portion of #27 as d21ded75fd, crediting Andres and himself as authors and Tomas and John as testers, with small final edits including a corrected empty-block diagnostic; the benchmark module was omitted #29.
- The thread ends with the slab performance work landed; smaller size fields, growing slab blocks, and whether statistics should count free chunks in retained empty blocks remained follow-up topics, while the original hot/cold-path companion was outside this landing #27 #29.