Skip to contentSkip to conversation

mm-khugepaged-better-comments-for-anon-vma-check-in-hugepage_vma_revalidate.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 18, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidate
has been removed from the -mm tree. Its filename was
mm-khugepaged-better-comments-for-anon-vma-check-in-hugepage_vma_revalidate.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Yang Shi <[email protected]>
Subject: mm: khugepaged: better comments for anon vma check in hugepage_vma_revalidate
Date: Thu, 16 Jun 2022 10:48:36 -0700

The hugepage_vma_revalidate() needs to check if the vma is still anonymous vma or not since the address may be unmapped then remapped to file before khugepaged reaquired the mmap_lock.

The old comment is not quite helpful, elaborate this with better comment.

---

 mm/khugepaged.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
mm/khugepaged.c renamed from mm/khugepaged.c~mm-khugepaged-better-comments-for-anon-vma-check-in-hugepage_vma_revalidate +7 -1
@@ -958,7 +958,13 @@ static int hugepage_vma_revalidate(struc
 		return SCAN_ADDRESS_RANGE;
 	if (!hugepage_vma_check(vma, vma->vm_flags))
 		return SCAN_VMA_CHECK;
-	/* Anon VMA expected */
+	/*
+	 * Anon VMA expected, the address may be unmapped then
+	 * remapped to file after khugepaged reaquired the mmap_lock.
+	 *
+	 * hugepage_vma_check may return true for qualified file
+	 * vmas.
+	 */
 	if (!vma->anon_vma || !vma_is_anonymous(vma))
 		return SCAN_VMA_CHECK;
 	return 0;

_

Patches currently in -mm which might be from [email protected] are

mm-khugepaged-dont-carry-huge-page-to-the-next-loop-for-config_numa.patch