On 2025/10/4 10:04, Wei Yang wrote:
On Fri, Oct 03, 2025 at 09:49:28PM +0800, Lance Yang wrote:
Hey Wei,
On 2025/10/2 09:38, Wei Yang wrote:
We add pmd folio into ds_queue on the first page fault in __do_huge_pmd_anonymous_page(), so that we can split it in case of memory pressure. This should be the same for a pmd folio during wp page fault.
Commit 1ced09e0331f ("mm: allocate THP on hugezeropage wp-fault") miss to add it to ds_queue, which means system may not reclaim enough memory
IIRC, it was commit dafff3f4c850 ("mm: split underused THPs") that started unconditionally adding all new anon THPs to _deferred_list :)
Thanks for taking a look.
While at this time do_huge_zero_wp_pmd() is not introduced, how it fix a
Ah, I see. I was focused on the policy change ...
non-exist case? And how could it be backported? I am confused here.
And, yes, 1ced09e0331f ("mm: allocate THP on hugezeropage wp-fault") was merged later and it introduced the new do_huge_zero_wp_pmd() path without aligning with the policy ...
Thanks for clarifying! Lance
in case of memory pressure even the pmd folio is under used.
Move deferred_split_folio() into map_anon_folio_pmd() to make the pmd folio installation consistent.
Fixes: 1ced09e0331f ("mm: allocate THP on hugezeropage wp-fault")
Shouldn't this rather be the following?
Fixes: dafff3f4c850 ("mm: split underused THPs")
Thanks, Lance