1*4882a593Smuzhiyun.. _hugetlbpage_index: 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun==================== 4*4882a593SmuzhiyunHugeTLBpage on ARM64 5*4882a593Smuzhiyun==================== 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunHugepage relies on making efficient use of TLBs to improve performance of 8*4882a593Smuzhiyunaddress translations. The benefit depends on both - 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun - the size of hugepages 11*4882a593Smuzhiyun - size of entries supported by the TLBs 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunThe ARM64 port supports two flavours of hugepages. 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun1) Block mappings at the pud/pmd level 16*4882a593Smuzhiyun-------------------------------------- 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunThese are regular hugepages where a pmd or a pud page table entry points to a 19*4882a593Smuzhiyunblock of memory. Regardless of the supported size of entries in TLB, block 20*4882a593Smuzhiyunmappings reduce the depth of page table walk needed to translate hugepage 21*4882a593Smuzhiyunaddresses. 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun2) Using the Contiguous bit 24*4882a593Smuzhiyun--------------------------- 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunThe architecture provides a contiguous bit in the translation table entries 27*4882a593Smuzhiyun(D4.5.3, ARM DDI 0487C.a) that hints to the MMU to indicate that it is one of a 28*4882a593Smuzhiyuncontiguous set of entries that can be cached in a single TLB entry. 29*4882a593Smuzhiyun 30*4882a593SmuzhiyunThe contiguous bit is used in Linux to increase the mapping size at the pmd and 31*4882a593Smuzhiyunpte (last) level. The number of supported contiguous entries varies by page size 32*4882a593Smuzhiyunand level of the page table. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunThe following hugepage sizes are supported - 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun ====== ======== ==== ======== === 38*4882a593Smuzhiyun - CONT PTE PMD CONT PMD PUD 39*4882a593Smuzhiyun ====== ======== ==== ======== === 40*4882a593Smuzhiyun 4K: 64K 2M 32M 1G 41*4882a593Smuzhiyun 16K: 2M 32M 1G 42*4882a593Smuzhiyun 64K: 2M 512M 16G 43*4882a593Smuzhiyun ====== ======== ==== ======== === 44