Thread (81 messages) 81 messages, 3 authors, 5d ago

Re: [PATCH v5 34/38] mm: eliminate VMA_SPECIAL_FLAGS check in lru_gen_look_around()

flat view

From: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>
Date: 2026-10-13 11:45:58
Also in: bpf, dri-devel, fuse-devel, kvm, kvm-riscv, kvmarm, linux-arch, linux-doc, linux-fbdev, linux-fsdevel, linux-mm, linux-perf-users, linux-rdma, linux-riscv, linux-s390, linux-scsi, linux-sound, linux-trace-kernel, linux-usb, lkml, selinux, sparclinux

On Mon, Oct 12, 2026 at 08:50:09PM +0200, David Hildenbrand (Arm) wrote:
On 10/9/26 20:04, Lorenzo Stoakes (ARM) wrote:
quoted
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 3b318efa2916..7adffe8182b3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -4418,8 +4418,8 @@ bool lru_gen_look_around(struct page_vma_mapped_walk *pvmw, unsigned int nr)
 	if (spin_is_contended(pvmw->ptl))
 		return true;

-	/* exclude special VMAs containing anon pages from COW */
-	if (vma->vm_flags & VM_SPECIAL)
+	/* exclude fixed and non-mm-managed VMAs containing anon pages from COW */
+	if (!vma_is_mm_managed(vma) || vma_is_fixed_mapping(vma))
 		return true;
If you keep the droppable thing out there you can just use

vma_is_mm_backed() here I think.
Yeah I think you're right, will update for v6!
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Thanks!

--
Cheers, Lorenzo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help