)]}'
{
  "commit": "0bde47d21d986329df2936673d2dceae08536db9",
  "tree": "3b6274ff5223205944842df51f3f602587f5ea30",
  "parents": [
    "c3d335c38577b8c394b60929ac35104db7a0cdf1"
  ],
  "author": {
    "name": "Matt Turner",
    "email": "mattst88@gmail.com",
    "time": "Sat Sep 12 22:49:32 2026 -0400"
  },
  "committer": {
    "name": "Matt Turner",
    "email": "mattst88@gmail.com",
    "time": "Sat Sep 12 22:49:32 2026 -0400"
  },
  "message": "DO NOT SUBMIT: hugepage follow-up ideas as of 2026-09-12\n\nAlpha has no leaf entry above the PTE level. A PMD entry covers 8MB and\nthe largest granularity hint (GH) block is 4MB, so anything in core mm\nthat assumes PMD or PUD leaves does not fit. Everything below has to work\nthe way arm64\u0027s contiguous PTEs do: several PTEs describing one physical\nblock.\n\nWorth building\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n1. Transparent GH for large folios (biggest win, most work)\n\n   Model: arch/arm64/mm/contpte.c. When set_ptes() maps an aligned 64K,\n   512K or 4MB folio, set the hint on the whole block, and split it back\n   into single pages on mprotect, partial munmap, CoW and so on.\n\n   Payoff: ordinary programs get the TLB benefit without hugetlbfs. That\n   covers anon mTHP, large page cache folios (ext4, xfs, tmpfs) and exec\n   text read ahead at 64K through exec_folio_order() (mm/filemap.c).\n   The EV7 measurement (555 vs 301 cycles per access, base pages vs 4MB)\n   is the justification.\n\n   Blocker: every one of those paths depends on\n   CONFIG_TRANSPARENT_HUGEPAGE, which needs HAVE_ARCH_TRANSPARENT_HUGEPAGE,\n   which assumes PMD leaves.\n   - Without THP, mapping_max_folio_size_supported() returns PAGE_SIZE\n     (include/linux/pagemap.h).\n   - The runtime off switch does not help: thp_disabled_by_hw() also\n     disables mTHP (mm/memory.c).\n   So this needs a core mm change: let an arch enable THP with the PMD\n   order never allowed, and stub out pmd_trans_huge() and friends. That\n   is an upstream discussion, not just arch code.\n\n   The rules that every PTE in a block must match in bits \u003c15:0\u003e, and\n   that young/dirty apply to the whole block, are already implemented in\n   arch/alpha/mm/hugetlbpage.c. That code can be moved somewhere shared.\n\n2. Huge vmalloc through GH (huge-vmap is TODO for alpha)\n\n   arm64 does this with contiguous PTEs: arch_vmap_pte_supported_shift()\n   and arch_vmap_pte_range_map_size(). It needs HAVE_ARCH_HUGE_VMAP plus\n   stub pmd_set_huge()/pud_set_huge() that return 0.\n\n   The benefit is small. KSEG already maps most kernel memory with no TLB\n   entries, so only vmalloc users gain: modules, BPF, and large\n   vmalloc_huge() hash tables. It is still a fairly contained patch.\n\n3. userfaultfd write-protect (HAVE_ARCH_USERFAULTFD_WP)\n\n   Not specific to huge pages, but it covers hugetlbfs too. It needs a\n   spare PTE bit plus a swap PTE bit. Bits \u003c31:17\u003e look free, but check.\n\nNot worth it\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n- HVO (HUGETLB_PAGE_OPTIMIZE_VMEMMAP): needs SPARSEMEM_VMEMMAP, which\n  Alpha does not have. The saving is about 24KB per 4MB page (0.6%).\n- ARCH_WANT_HUGE_PMD_SHARE: only applies to pages the size of a PUD\n  entry.\n- hugetlb_cma / gigantic pages: 4MB is below MAX_PAGE_ORDER, so the buddy\n  allocator already handles it.\n\nOther alpha TODOs in Documentation/features/\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\n- vm: THP (item 1), huge-vmap (item 2), ioremap_prot, ELF-ASLR, and TLB\n  (batched unmap flush).\n- Everything else: jump-labels, kprobes/uprobes, stackprotector, KASAN,\n  kcov, eBPF JIT, queued spinlocks/rwlocks, context-tracking and NUMA\n  balancing.\n\nPlan: send the current series first, then prototype item 1 on megalith.\nThe mm change decides whether it is viable, so float it on linux-mm\nearly and point to arm64 contpte as precedent.\n",
  "tree_diff": []
}
