Re: [v2 00/16] mm: PMD-level swap entries for anonymous THPs

From: Lance Yang

Date: Wed Jun 10 2026 - 09:08:54 EST




On 2026/6/10 20:24, David Hildenbrand (Arm) wrote:
On 6/9/26 16:29, Usama Arif wrote:


On 02/06/2026 15:24, Usama Arif wrote:
When reclaim swaps out a PMD-mapped anonymous THP today, the PMD is
split into 512 PTE-level swap entries via TTU_SPLIT_HUGE_PMD before
unmap.

This series introduces a PMD-level swap entry. The huge mapping is
preserved across the swap round-trip, and do_huge_pmd_swap_page()
resolves the entire 2 MB region in a single fault on swap-in,
no khugepaged involvement is needed. swap_map metadata is identical
either way (512 single-slot counts), so the PTE split buys nothing
on the swap side, it is purely a page-table representation change.


Hello!

Just following up if there were any reviews/comments on this series!

I know its a large series but was just checking if there was any
feedback?

It shall be reviewed. We just finished the mTHP khugepaged review to get it into
7.2, so we've all been rather busy.

Right, mTHP khugepaged was a rough one. Glad we got it over the line,
but yeah, there's just been a lot of THP work lately. pretty nonstop ...

(I mean, just take a look at the THP-related flood of patches we are fighting
with on a daily basis, it's not funny anymore)

This is clearly going to be 7.3 material, so there is plenty of time given that
the merge window is about to open soon.

Usama, I'll try to make this one a priority too. Looks interesting :P

Cheers, Lance