Skip to contentSkip to conversation

mm-khugepaged-skip-dax-vma.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 19, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: khugepaged: skip DAX vma
has been removed from the -mm tree. Its filename was
mm-khugepaged-skip-dax-vma.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: skip DAX vma

The DAX vma may be seen by khugepaged when the mm has other khugepaged suitable vmas. So khugepaged may try to collapse THP for DAX vma, but it will fail due to page sanity check, for example, page is not on LRU.

So it is not harmful, but it is definitely pointless to run khugepaged against DAX vma, so skip it in early check.

---

 mm/khugepaged.c |    4 ++++
 1 file changed, 4 insertions(+)
mm/khugepaged.c renamed from mm/khugepaged.c~mm-khugepaged-skip-dax-vma +4 -0
@@ -447,6 +447,10 @@ static bool hugepage_vma_check(struct vm
 	if (vm_flags & VM_NO_KHUGEPAGED)
 		return false;
 
+	/* Don't run khugepaged against DAX vma */
+	if (vma_is_dax(vma))
+		return false;
+
 	if (vma->vm_file && !IS_ALIGNED((vma->vm_start >> PAGE_SHIFT) -
 				vma->vm_pgoff, HPAGE_PMD_NR))
 		return false;

_

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

mm-rmap-use-the-correct-parameter-name-for-define_page_vma_walk.patch mm-pvmw-check-possible-huge-pmd-map-by-transhuge_vma_suitable.patch