diff options
| author | Matt Turner <mattst88@gmail.com> | 2026-10-07 23:24:09 -0400 |
|---|---|---|
| committer | Magnus Lindholm <linmag7@gmail.com> | 2026-10-18 00:44:44 +0200 |
| commit | 8ba8994e76e45a47e749a7f92fdfe0ee701362e3 (patch) | |
| tree | 40662fe82b44df4146002070fa24c25ae87bcbd9 /tools/perf/scripts/python | |
| parent | d25293ba796669664d3f4e2721ed8b67a1f96f4a (diff) | |
| download | linux-8ba8994e76e45a47e749a7f92fdfe0ee701362e3.tar.gz linux-8ba8994e76e45a47e749a7f92fdfe0ee701362e3.zip | |
alpha: implement hugetlb support
Alpha has no leaf entry above the last page table level, so the only
huge pages it can offer are granularity hint blocks: 64KB, 512KB and 4MB
with 8KB pages. Register all three as hstates, with 4MB as the default.
There is no PMD sized huge page, hence no transparent huge pages, no PMD
page table sharing and no gigantic pages.
As with arm64's contiguous PTEs, each PTE of a block keeps the frame
number of its own page, so a block is written with set_ptes(). Each
hstate's buddy order is its hint order, so a hugetlb folio is always
naturally aligned physically, as the hint requires, including after a
demote.
All PTEs of a block must agree in bits <15:0> (note 2 of Table 22-3 of
the Alpha Architecture Reference Manual), and both __ACCESS_BITS and
__DIRTY_BITS reach into that range, so every update rewrites the whole
block and huge_ptep_get() merges the young and dirty state back
together. Rewriting a valid block in place would leave its PTEs
disagreeing part way through, so changes to a valid block go through
break before make, following the procedure in section 11.6.1.
The hint is advisory, so this is safe on implementations that ignore it,
and gup_fast needs no changes since it walks the individual PTEs.
Enabling CONFIG_HUGETLB_PAGE derives pageblock_order from
HUGETLB_PAGE_ORDER, which lowers it from 10 to 9 and so halves the
anti-fragmentation and compaction granularity from 8MB to 4MB.
Hugepage migration is left disabled, since it has not been tested.
Co-developed-by: Magnus Lindholm <linmag7@gmail.com>
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Tested-by: Magnus Lindholm <linmag7@gmail.com>
Reviewed-by: Magnus Lindholm <linmag7@gmail.com>
Link: https://lore.kernel.org/r/20261007-alpha-hugepages-v2-6-8e108af2d961@gmail.com
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
