요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. _hugetlbpage_index:
====================
HugeTLBpage on ARM64
====================
Hugepage relies on making efficient use of TLBs to improve performance of
address translations. The benefit depends on both -
- the size of hugepages
- size of entries supported by the TLBs
The ARM64 port supports two flavours of hugepages.
1) Block mappings at the pud/pmd level
--------------------------------------
These are regular hugepages where a pmd or a pud page table entry points to a
block of memory. Regardless of the supported size of entries in TLB, block
mappings reduce the depth of page table walk needed to translate hugepage
addresses.
2) Using the Contiguous bit
---------------------------
The architecture provides a contiguous bit in the translation table entries
(D4.5.3, ARM DDI 0487C.a) that hints to the MMU to indicate that it is one of a
contiguous set of entries that can be cached in a single TLB entry.
The contiguous bit is used in Linux to increase the mapping size at the pmd and
pte (last) level. The number of supported contiguous entries varies by page size
and level of the page table.
The following hugepage sizes are supported -
====== ======== ==== ======== ===
- CONT PTE PMD CONT PMD PUD
====== ======== ==== ======== ===
4K: 64K 2M 32M 1G
16K: 2M 32M 1G
64K: 2M 512M 16G
====== ======== ==== ======== ===
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ARM64 hugepage 개요
1-14Sphinx anchor는 `_hugetlbpage_index`입니다. Hugepage는 TLB를 효율적으로 사용해 address translation 성능을 높이며, 이점은 hugepage 크기와 TLB가 지원하는 entry 크기에 모두 좌우됩니다.
ARM64 port는 두 가지 hugepage 방식을 지원합니다.
PUD·PMD block mapping
15-22일반 hugepage 방식에서는 `pmd` 또는 `pud` page-table entry가 memory block을 가리킵니다. TLB가 지원하는 entry 크기와 무관하게 block mapping은 hugepage address translation에 필요한 page-table walk 깊이를 줄입니다.
Contiguous bit와 지원 크기
23-43Architecture는 translation-table entry에 contiguous bit를 제공합니다(`D4.5.3`, `ARM DDI 0487C.a`). 이는 해당 entry가 하나의 TLB entry로 cache할 수 있는 연속 entry 집합의 일부임을 MMU에 알려 주는 hint입니다.
Linux는 contiguous bit를 사용해 `pmd`와 마지막 `pte` level에서 mapping 크기를 늘립니다. 지원되는 연속 entry 수는 page 크기와 page-table level에 따라 달라집니다.
| Base page | CONT PTE | PMD | CONT PMD | PUD |
|---|---|---|---|---|
| 4K | 64K | 2M | 32M | 1G |
| 16K | 2M | 32M | 1G | 지원 없음 |
| 64K | 2M | 512M | 16G | 지원 없음 |
요약과 해설
hugetlbpage.rst:1-43ARM64 hugepage는 page-table walk 깊이를 줄이는 block mapping과 여러 entry를 TLB 하나로 cache하도록 hint하는 contiguous bit를 함께 사용합니다.
두 방식은 page-table과 TLB 비용을 서로 다른 지점에서 줄입니다.
원문의 CONT PTE·PMD·CONT PMD·PUD 지원 값을 보여 줍니다.