Skip to contentSkip to conversation

mm-mlock-stop-counting-mlocked-pages-when-none-vma-is-found.patch removed from -mm tree

merged [email protected] 1 participant 1 message Feb 27, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/mlock: stop counting mlocked pages when none vma is found
has been removed from the -mm tree. Its filename was
mm-mlock-stop-counting-mlocked-pages-when-none-vma-is-found.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Miaohe Lin <[email protected]>
Subject: mm/mlock: stop counting mlocked pages when none vma is found

There will be no vma satisfies addr < vm_end when find_vma() returns NULL. Thus it's meaningless to traverse the vma list below because we can't find any vma to count mlocked pages. Stop counting mlocked pages in this case to save some vma list traversal cycles.

---

 mm/mlock.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/mlock.c renamed from mm/mlock.c~mm-mlock-stop-counting-mlocked-pages-when-none-vma-is-found +1 -1
@@ -622,7 +622,7 @@ static unsigned long count_mm_mlocked_pa
 
 	vma = find_vma(mm, start);
 	if (vma == NULL)
-		vma = mm->mmap;
+		return 0;
 
 	for (; vma ; vma = vma->vm_next) {
 		if (start >= vma->vm_end)

_

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