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