[PATCH v2] KVM: arm64: Fast fail transparent_hugepage_adjust() for non-PMD folios

Oliver Upton oupton at kernel.org
Tue Nov 17 13:57:25 PST 2026


On Thu, 12 Nov 2026 11:37:29 +0000, Vincent Donnefort wrote:
> transparent_hugepage_adjust() must walk the userspace stage-1 to detect
> if a PMD-level mapping is installed and whether a stage-2 block mapping
> can be used. Even though this stage-1 walk is most likely cache hot
> (in most cases, the mapping has just been installed), walking a
> page-table is still costly.
> 
> While we can't be sure by solely looking at the folio if the stage-1 is
> a block mapping as userspace has multiple ways to split it, we can infer
> from its size if the stage-1 mapping is smaller than PMD_SIZE. Anonymous
> memory or memfd faults allocate a big enough folio, as do khugepaged or
> MADV_COLLAPSE.
> 
> [...]

Applied to next, thanks!

[1/1] KVM: arm64: Fast fail transparent_hugepage_adjust() for non-PMD folios
      https://git.kernel.org/kvmarm/kvmarm/c/9da9b26ce1ac

--
Best,
Oliver



More information about the linux-arm-kernel mailing list