On Mon, Nov 18, 2013 at 3:54 AM, Ben Kloosterman <[email protected]> wrote:
> >> BTW the Immix code has a concept called Chunks which is just N blocks. >>> Basically a bunch of pages .. but it has some metadata. >>> More on this later , im still exploring it. >>> >> >> Look forward to hearing about it. >> > > Things i note > - The Heap is a list of chunks > - Chunks seem to hold the metadata for the blocks. > - It is a Jikes structure > - Chunks are 4Meg > - Chunks , Lines and Blocks are all 2^N structures with Masks . > - For systems with pages < 32K , 128 blocks in a Chunk. > - Blocks are allocated from chunks and marked in use / recycled. > - There is a high water mark ..so used for getting more memory . > > Bits i dont understand for now > - Discontiguous chunks > - Blocks being freed release pages. > The way you write this leads me to ask: is per-line metadata being stored in the block, or in the chunk? Also, you write "chunks are 4M" and then "chunks are 128 blocks". Which happens to be correct if blocks are 32K, but I suspect the 4M number reflects the intent better - it matches the large-page page table entry span on most architectures. At 4M, it's also perfectly reasonable for a 32-bit implementation to allocate a 1Kbyte table for chunk metadata, making frame type discovery easier. Releasing the backing pages when a block is freed makes good sense - if you don't release the pages, you continue to have swap space occupancy. > You can, but you really don't want do. The zeroing speed is one of the >> under-appreciated advantages of a bump allocator. Zeroing long chunks can >> be done with (cache line zero) on a lot of modern machines. That's hugely >> faster than word-at-a-time can do it. >> > > Does ARM/X86 have it ? I know IBM Power do . > X86 does, and I *think* Arm does too. Thank you for digging in to the fast path allocation. I didn't anticipate the /cursor/ variable, but it's otherwise very much what I expected. It's not clear to me why they are bothering to fill the alignment gap. And come to that, I guess I'm a little surprised that they aren't using a common alignment for nearly everything. But very little of that really matters. The code makes sense. Jonathan
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
