4 ms·
The twitter thread says it specifically doesn't change the size of a page, though. AIUI the idea is that it allows one TLB entry to cover more than just one pag
by pm215 5y ago
The twitter thread says it specifically doesn't change the size of a page, though. AIUI the idea is that it allows one TLB entry to cover more than just one page -- the page table entry promises "all 64K have the same permissions", so the TLB doesn't need to track every page in that 64K separately. That's useful because TLB entries are a limited resource and using more of them means we get more TLB misses and worse peformance. You could also economise on TLB use by making the page size larger, but then it has to be larger for the whole process, which has binary-compatibility implications and also can waste memory (eg with a 64K page size, even if you only need 4K to mmap a small file you have to use 64K anyway).
Compare the Arm page table 'contiguous hint bit', which achieves the same thing in a slightly different way.
- deleted 5y ago[deleted]
- monocasa 5y agoTechnically true, but code running on those mappings won't be able to tell the difference. Another way to look at it is that the page size does change, but the size of the page table entry expands at the same rate, and you can therefore mix and match page sizes. They're equivalent concepts.