The quilt patch titled Subject: mm: pvmw: check possible huge PMD map by transhuge_vma_suitable() has been removed from the -mm tree. Its filename was mm-pvmw-check-possible-huge-pmd-map-by-transhuge_vma_suitable.patch This patch was dropped because it had testing failures ------------------------------------------------------ From: Yang Shi <shy828301@xxxxxxxxx> Subject: mm: pvmw: check possible huge PMD map by transhuge_vma_suitable() IIUC PVMW checks if the vma is possibly huge PMD mapped by transparent_hugepage_active() and "pvmw->nr_pages >= HPAGE_PMD_NR". Actually pvmw->nr_pages is returned by compound_nr() or folio_nr_pages(), so the page should be THP as long as "pvmw->nr_pages >= HPAGE_PMD_NR". And it is guaranteed THP is allocated for valid VMA in the first place. But it may be not PMD mapped if the VMA is file VMA and it is not properly aligned. The transhuge_vma_suitable() is used to do such check, so replace transparent_hugepage_active() to it, which is too heavy and overkilling. Link: https://lkml.kernel.org/r/20220512174551.81279-2-shy828301@xxxxxxxxx Fixes: 2aff7a4755be ("mm: Convert page_vma_mapped_walk to work on PFNs") Signed-off-by: Yang Shi <shy828301@xxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_vma_mapped.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/page_vma_mapped.c~mm-pvmw-check-possible-huge-pmd-map-by-transhuge_vma_suitable +++ a/mm/page_vma_mapped.c @@ -237,13 +237,14 @@ restart: spin_unlock(pvmw->ptl); pvmw->ptl = NULL; } else if (!pmd_present(pmde)) { + unsigned long haddr = pvmw->address & HPAGE_PMD_MASK; /* * If PVMW_SYNC, take and drop THP pmd lock so that we * cannot return prematurely, while zap_huge_pmd() has * cleared *pmd but not decremented compound_mapcount(). */ if ((pvmw->flags & PVMW_SYNC) && - transparent_hugepage_active(vma) && + transhuge_vma_suitable(vma, haddr) && (pvmw->nr_pages >= HPAGE_PMD_NR)) { spinlock_t *ptl = pmd_lock(mm, pvmw->pmd); _ Patches currently in -mm which might be from shy828301@xxxxxxxxx are sched-coredumph-clarify-the-use-of-mmf_vm_hugepage.patch mm-khugepaged-remove-redundant-check-for-vm_no_khugepaged.patch mm-khugepaged-skip-dax-vma.patch mm-thp-only-regular-file-could-be-thp-eligible.patch mm-khugepaged-make-khugepaged_enter-void-function.patch mm-khugepaged-make-hugepage_vma_check-non-static.patch mm-khugepaged-introduce-khugepaged_enter_vma-helper.patch mm-mmap-register-suitable-readonly-file-vmas-for-khugepaged.patch mm-rmap-use-the-correct-parameter-name-for-define_page_vma_walk.patch