For evaluation strategies, I see:
- 1. TLB-MPKI Talluri-Hill (ASPLOS '94), Navarro-Iyer-Druschel-Cox (OSDI '02), Barr-Cox-Rixner (ISCA '10)
- 2. cache pollution, maybe LLC-MPKI, originators unclear
- 3. LLC/TLB-MPKI vs. RAM scaling curves to determine „memory walls” per Wulf-McKee '95
- 4. Attribution / stack-distance modelling per Mattson '70

My own list of things I'd like to measure is:
- 1. Queueing: inter-arrival times and service times have more predictive power
- 2. Distribution fairness: the grand total never matters as much as the distribution, where fairness is a central concern, as well as priority inversion
- 3. Distribution utilisation: is effective use being made of sizes across the size spectrum?
- 4. Verification of small superpage size allocation guarantees
- 5. Fragmentation metrics
- 6. Verification of increased allocation success likelihoods for larger page sizes in the face of external fragmentation
- 7. Defragmentation overhead
- 8. Distribution to shared mappings: the highest impact can be had via sharing, so it's also a question of whether the contiguity has been distributed to the shared memory objects of greatest impact.

The MPKI notion is on the one hand a reciprocal of inter-arrival times and on the other isn't naturally comparable or extensible to service times. Wulf-McKee recast in queueing theoretical terms still doesn't cover the full range of issues I'm working on, though. Metrics for 4. distribution fairness, 7. defragmentation overhead and 8. distribution to shared mappings and maybe more need to be devised.

#telix #pgcl #superpages

I was apparently leaking PAGE_SIZE via the ELF AUXV where I needed to send MMUPAGE_SIZE.

The terminology may be so confusing as to be rapidly becoming an existential crisis for the project. Perhaps what I should do is:

- 1. MMUPAGE_SHIFT → MMU_GRANULE_SHIFT or MMU_GRAIN_SHIFT
- 2. PAGE_SHIFT → ALLOC_UNIT_SHIFT
- 3. PAGE_MMUSHIFT → ALLOC_UNIT_MMU_GRANULE_ASSEMBLY_SHIFT or BUNDLE_SHIFT
- 4. PAGE_MMUCOUNT → ALLOC_UNIT_MMU_GRANULE_ASSEMBLY_RATIO or BUNDLE_SIZE
- PAGE_SHIFT == MMUPAGE_SHIFT + PAGE_MMUSHIFT
- ALLOC_UNIT_SHIFT == MMU_GRANULE_SHIFT + ALLOC_UNIT_MMU_GRANULE_ASSEMBLY_SHIFT

I still need to ping Hugh Dickins to be sure the ABI binary compatibility algorithms were original to him, though I'm already sure enough that I should update the docs to add him to Babaoğlu and Joy as one of the originators of the page clustering algorithms to cite. There may be snappier names I might be able to come up with later esp. for the latter two. Hopefully there's a shorter term other than „page” (or „granule”) for allocation units out there somewhere. It may have been a brilliant set of algorithms, but the variable names might not have been the most easily distinguishable from each other.

The assembly ratio needs a shorter name even worse, which may not be the right framing for it anyway, because it's really more about adjacent page sizes and is used in discussions of superpage allocations above the allocation unit size. That is, the number of adjacent aligned superpages of one superpage size required to form a superpage of the next larger size for promotion is what's referred to as an assembly ratio. In a MIPS system with 64 KiB ALLOC_UNIT_SIZE but using the 1 KiB PageGrain extension, promotions to 4 KiB and 16 KiB are both possible strictly between the MMU_GRANULE_SIZE and ALLOC_UNIT_SIZE, so it can't be assumed there's only a single intermediate mapping size. Similar could occur with very large allocation unit sizes. Perhaps „cluster” might be one way, but that's got a potential future terminological conflict with actual clustering. Bunches, bundles, batches, groupings, aggregates, etc. fail to cover all of the issues because they may still need to include the objects they're batching to be unambiguous. On the other hand, at least they get out of the collision in the namespace so long as nothing accidentally takes them up in their generic senses. I added bundle-based alternatives for the assembly ratio constants.