Re: [RESEND v7 00/29] mm: PMD-level swap entries for anonymous THPs
From: Andrew Morton
Date: Mon Sep 14 2026 - 23:33:07 EST
On Mon, 14 Sep 2026 05:27:50 -0700 Usama Arif <usama.arif@xxxxxxxxx> wrote:
> When reclaim swaps out a PMD-mapped anonymous THP today, the PMD is
> split into HPAGE_PMD_NR PTE-level swap entries via TTU_SPLIT_HUGE_PMD
> before unmap. This series introduces a PMD-level swap entry so the
> huge mapping can survive the swap round-trip and do_huge_pmd_swap_page()
> can restore the PMD mapping directly on swap-in, without waiting for
> khugepaged to collapse the range later.
Thanks. I'd describe this as an inevitable step along our thp journey.
Has to be done sometime.
I'll await more review, especially of the core parts: pmd swap fault
handler (#27) and swapout producer (#28).
And it's a 29-patch performance optimization without any performance
testing results ;) Is efficacy testing in the works?