v2
2026-09-29
拆分未充分使用的匿名mTHP · v2
v2 让 thp_underused() 支持 mTHP,把未充分使用的匿名 mTHP folio 加入 deferred split 链表。
原始补丁链接
子 Patch(3)
1/3
mm/huge_memory: make thp_underused() work for mTHP folios
thp_underused() decides whether a large folio on the deferred split list is underused and should be split so that its zero-filled subpages can be reclaimed. Today it only ever checks if the folio is
2/3
mm/huge_memory: don't queue folios that can never be underused
Every anonymous PMD-sized folio is put on the deferred split queue when it is first mapped, so that the shrinker can find it under memory pressure and split it if it turns out to be mostly zero-filled
3/3
mm/memory: add anonymous mTHP folios to the deferred split list
Unlike for PMD-sized folios, an anonymous mTHP folio doesn’t get added to the deferred split list at fault or collapse time. As a result, a fully mapped mTHP folio that is mostly zero-filled doesn’t g