Re: [PATCH] mm: alloc_anon_folio: avoid doing vma_thp_gfp_mask in fallback cases

From: Zi Yan
Date: Mon Apr 01 2024 - 11:20:54 EST


On 29 Mar 2024, at 3:37, Barry Song wrote:

> From: Barry Song <v-songbaohua@xxxxxxxx>
>
> Fallback rates surpassing 90% have been observed on phones utilizing 64KiB
> CONT-PTE mTHP. In these scenarios, when one out of every 16 PTEs fails
> to allocate large folios, the remaining 15 PTEs fallback. Consequently,
> invoking vma_thp_gfp_mask seems redundant in such cases. Furthermore,
> abstaining from its use can also contribute to improved code readability.
>
> Cc: Ryan Roberts <ryan.roberts@xxxxxxx>
> Cc: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
> Cc: John Hubbard <jhubbard@xxxxxxxxxx>
> Cc: David Hildenbrand <david@xxxxxxxxxx>
> Cc: Alistair Popple <apopple@xxxxxxxxxx>
> Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>
> Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> Cc: David Rientjes <rientjes@xxxxxxxxxx>
> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx>
> Cc: Hugh Dickins <hughd@xxxxxxxxxx>
> Cc: Itaru Kitayama <itaru.kitayama@xxxxxxxxx>
> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx>
> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> Cc: Vlastimil Babka <vbabka@xxxxxxx>
> Cc: Yang Shi <shy828301@xxxxxxxxx>
> Cc: Yin Fengwei <fengwei.yin@xxxxxxxxx>
> Cc: Yu Zhao <yuzhao@xxxxxxxxxx>
> Cc: Zi Yan <ziy@xxxxxxxxxx>
> Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
> ---
> mm/memory.c | 3 +++
> 1 file changed, 3 insertions(+)

LGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

--
Best Regards,
Yan, Zi

Attachment: signature.asc
Description: OpenPGP digital signature