Re: [RFC 1/2] mm: thp: allocate PTE page tables lazily at split time
From: David Hildenbrand (Arm)
Date: Wed Feb 11 2026 - 14:55:54 EST
On 2/11/26 20:28, Matthew Wilcox wrote:
On Wed, Feb 11, 2026 at 04:49:45AM -0800, Usama Arif wrote:
- Memory reclaim (try_to_unmap()): Returns false, folio rotated back
LRU, retried in next reclaim cycle.
I was advised to ask my stupid question ...
Why do we still try to split the PMD in reclaim? I understand we're
about to swap the folio out and we'll need to put a swap entry in the page
table so we can find it again. But can't we now store swap entries at the
PMD level, or are we still forced to store 512 entries at the PTE level?
Yes. We don't support PMD swap entries yet.
I don't know all historical details. I suspect there are some rough edges around swapin (assume we cannot swapin a 2M THP), and maybe it was just easier to not deal with splitting of PMD swap entries (which we would similarly have to support).
For sure an interesting project to look into.
--
Cheers,
David