Worked all day on getting the Linux mmap up to at least macOS snuff. It looks like that's finally turned the corner. The pivotal issue has been that there is no way to mark a region as retention priority, all you get is global OS config. macOS provide an madvise flag for this, and Windows manages it automatically by observation of access patterns. And hashmap heads need priority retention. The issue has been that they can be accessed much less than bodies, resulting in them getting moved to swap, which is a disaster.
So in the absence of a flag I figured we can just sweep each page with a byte read. No need for any guards, the value is tossed (and the call marked volatile so that it's not optimized out) and doesn't affect other reads/writes. The cost is low and it keeps the heads more current than the bodies, so cold body pages are released first. That resulted in zero swap (vs. 100% / 8GB). Not done yet, but looking hopeful. This condition arises during validation, milestone had previously been sufficiently optimized.