The patch titled Subject: thp: introduce hugepage_vma_check() has been removed from the -mm tree. Its filename was thp-introduce-hugepage_vma_check.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Bob Liu <lliubbo@xxxxxxxxx> Subject: thp: introduce hugepage_vma_check() Multiple places do the same check. Signed-off-by: Bob Liu <lliubbo@xxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxx> Cc: Minchan Kim <minchan.kim@xxxxxxxxx> Cc: Ni zhan Chen <nizhan.chen@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff -puN mm/huge_memory.c~thp-introduce-hugepage_vma_check mm/huge_memory.c --- a/mm/huge_memory.c~thp-introduce-hugepage_vma_check +++ a/mm/huge_memory.c @@ -1894,6 +1894,20 @@ static struct page } #endif +static bool hugepage_vma_check(struct vm_area_struct *vma) +{ + if ((!(vma->vm_flags & VM_HUGEPAGE) && !khugepaged_always()) || + (vma->vm_flags & VM_NOHUGEPAGE)) + return false; + + if (!vma->anon_vma || vma->vm_ops) + return false; + if (is_vma_temporary_stack(vma)) + return false; + VM_BUG_ON(vma->vm_flags & VM_NO_THP); + return true; +} + static void collapse_huge_page(struct mm_struct *mm, unsigned long address, struct page **hpage, @@ -1934,17 +1948,8 @@ static void collapse_huge_page(struct mm hend = vma->vm_end & HPAGE_PMD_MASK; if (address < hstart || address + HPAGE_PMD_SIZE > hend) goto out; - - if ((!(vma->vm_flags & VM_HUGEPAGE) && !khugepaged_always()) || - (vma->vm_flags & VM_NOHUGEPAGE)) + if (!hugepage_vma_check(vma)) goto out; - - if (!vma->anon_vma || vma->vm_ops) - goto out; - if (is_vma_temporary_stack(vma)) - goto out; - VM_BUG_ON(vma->vm_flags & VM_NO_THP); - pmd = mm_find_pmd(mm, address); if (!pmd) goto out; @@ -2152,20 +2157,11 @@ static unsigned int khugepaged_scan_mm_s progress++; break; } - - if ((!(vma->vm_flags & VM_HUGEPAGE) && - !khugepaged_always()) || - (vma->vm_flags & VM_NOHUGEPAGE)) { - skip: + if (!hugepage_vma_check(vma)) { +skip: progress++; continue; } - if (!vma->anon_vma || vma->vm_ops) - goto skip; - if (is_vma_temporary_stack(vma)) - goto skip; - VM_BUG_ON(vma->vm_flags & VM_NO_THP); - hstart = (vma->vm_start + ~HPAGE_PMD_MASK) & HPAGE_PMD_MASK; hend = vma->vm_end & HPAGE_PMD_MASK; if (hstart >= hend) _ Patches currently in -mm which might be from lliubbo@xxxxxxxxx are origin.patch thp-implement-refcounting-for-huge-zero-page-fix.patch thp-avoid-race-on-multiple-parallel-page-faults-to-the-same-page.patch hotplug-update-nodemasks-management-fix.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html