4 ms·
> Given a choice, I would almost always opt for bigger pages because they make memory allocation and access cheaper You can just allocate in units of 4, or how
by moonchild 5y ago
> Given a choice, I would almost always opt for bigger pages because they make memory allocation and access cheaper
You can just allocate in units of 4, or however many pages at once; and trust the OS's ability to speculate accesses. The main advantage of larger pages is smaller page tables and higher TLB hit rates.
- zeusk 5y ago> higher TLB hit rates Not always right? Atleast in x86 - switching to huge pages also decreases TLB size afaik. $ x86info -c ... TLB info Instruction TLB: 4K pages, 4-way associative, 128 entries. Instruction TLB: 4MB pages, fully associative, 2 entries Data TLB: 4K pages, 4-way associative, 128 entries. Data TLB: 4MB pages, 4-way associative, 8 entries
- sudosysgen 5y agoUnless I'm misunderstanding, despite reducing TLB size you still massively increase hit rate because each hit covers a lot more actual memory, right?
- zeusk 5y agoSure it covers more area, but that area has to be contiguous. System memory in modern bloated systems is anything but that.