Characterization of TLB and page allocation behavior on modern processors

Viswanathan Vaidyanathan
2012
Virtual memory support is prevalent in most modern processors and is facilitated through Translation Lookaside Buffers (TLBs) which play a major role in the overall system performance. TLB misses are costly since they require multiple high latency memory references to walk the page table and locate the desired Virtual Page Number (VPN) - Physical Page Number (PPN) mapping. This study improves TLB hit rates by taking advantage of any contiguity present in the pages allocated by the Operating
more » ... em (OS). By contiguity we refer to cases where consecutive VPNs are mapped to consecutive PPNs. Traditionally, OSs use large or superpages to collapse hundreds of such contiguous entries, thereby using one TLB entry to represent them rather than hundreds of entries they would normally require. Unfortunately due to implementation complexities superpaging has not been universally successful in reducing TLB pressure. We show, however, that even without explicit superpaging, various OS virtual memory allocation activities lead to intermediate levels of contiguity that may be exploited to coalesce TLB entries and significantly improve hit rates. We verify the presence of contiguity by running benchmarks on a real system and checking the page allocations of the OS. The OS page allocation schemes depend on memory pressure and memory defragmentation daemons. Further, we find an average contiguity of 30 pages over all the benchmarks and configurations with superpaging turned on and about 10 with superpaging turned off. To verify the performance of a Coalesced TLB we have implemented a fully associative TLB with variable size and Least Recently Used (LRU) replacement policy. Our results show an average hit rate improvement of 25% by adding an 8-16 entry fully associative Coalesced TLB. The Coalesced TLB further needs no complex hardware to implement, hence providing to a low cost means to reduce miss rates.
doi:10.7282/t3251gz5 fatcat:q2zz6mulkrgrvjbjs5dbb5ggza