RTS: add a striped allocator
Needs RevisionPublic

Authored by gcampax on Nov 4 2015, 11:28 AM.

Details

Summary

The striped allocator divides the address space in one private
range and a number of chunks. The idea is that each process/machine
is assigned one chunk, and can allocate into other processes
into its own chunk at predictable addresses. This will be used
for O(1) importing of CNF.

This depends on D1264.

Test Plan

validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Branch
tmp-striped-alloc
Lint
Lint WarningsExcuse:
SeverityLocationCodeMessage
Warningrts/sm/BlockAlloc.c:189TXT3Line Too Long
Warningrts/sm/BlockAlloc.c:690TXT3Line Too Long
Warningrts/sm/MBlock.c:345TXT3Line Too Long
Warningrts/sm/MBlock.c:367TXT3Line Too Long
Warningrts/sm/MBlock.c:526TXT3Line Too Long
Unit
No Unit Test Coverage
Build Status
Buildable 6528
Build 7563: GHC Patch Validation (amd64/Linux)
Build 7562: arc lint + arc unit
gcampax updated this revision to Diff 4921.Nov 4 2015, 11:28 AM
gcampax retitled this revision from to RTS: add a striped allocator.
gcampax updated this object.
gcampax edited the test plan for this revision. (Show Details)
gcampax added reviewers: ezyang, simonmar, erikd, austin, bgamari, hvr.
gcampax added a parent revision: D1264: Merge Compacts into GHC.
gcampax added subscribers: RyanGlScott, qnikst, mboes and 4 others.
austin requested changes to this revision.Mar 25 2016, 11:55 AM
austin edited edge metadata.

(As this is dependent on D1264: Merge Compacts into GHC which needs some more work, I'm punting this out of the review queue. Please update/rebase when you're ready!)

This revision now requires changes to proceed.Mar 25 2016, 11:55 AM
simonmar edited edge metadata.Apr 18 2016, 10:19 AM

Just to note that this conflicts with another idea I'm working on - a NUMA-aware allocator - which is also modelled by having multiple free lists in the block allocator.

Here's the NUMA diff: D2199

There's a lot of overlap; I've also added multiple free lists to the block allocator. I don't think there's a fundamental conflict, though, in fact many of the changes are identical. If we have a general concept of "multiple memory pools", then both concepts can be built from the same pieces, but I don't yet have a good understanding of how the striped allocator works.

@gcampax any thoughts?