Re: [PATCH v6 00/12] mm: PMD-level swap entries for anonymous THPs
From: Usama Arif
Date: Wed Aug 19 2026 - 09:05:29 EST
On 18/08/2026 14:09, Usama Arif 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.
>
Addressing sashiko feedback from [1] here as its a common reply for most of it.
The PMD swap entry is installed in patch 11, until that time, the path in patches
1-10 is not taken, so the feedback from sashiko is mostly wrong as the feedback
in patches 1-10 is that PMD swap entry is not handled in another path, but it
is in a later patch from where the feedback is being given.
If patches 1-10 were squashed into a single patch, I imagine sashiko will be
happy :)
[1] https://sashiko.dev/#/patchset/20260818131202.494754-1-usama.arif%40linux.dev