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

Re: [PATCH v5 33/38] mm: eliminate VMA_SPECIAL_FLAGS usage when hugetlb explicitly tested

flat view

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

On Mon, Oct 12, 2026 at 08:49:11PM +0200, David Hildenbrand (Arm) wrote:
On 10/9/26 20:04, Lorenzo Stoakes (ARM) wrote:
quoted
diff --git a/mm/ksm.c b/mm/ksm.c
index 624f37975e12..ed66a90e0031 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -747,9 +747,7 @@ static bool ksm_compatible(const struct file *file, vma_flags_t vma_flags)
 	if (vma_flags_test_any(&vma_flags, VMA_SHARED_BIT, VMA_MAYSHARE_BIT,
 			       VMA_HUGETLB_BIT))
 		return false;
-	if (vma_flags_test_single_mask(&vma_flags, VMA_DROPPABLE))
-		return false;
-	if (vma_flags_test_any_mask(&vma_flags, VMA_SPECIAL_FLAGS))
+	if (!vma_flags_is_mm_backed(&vma_flags))
 		return false;
Same here, it's hard for me to tell my brain that "permanently lazyfree pages
are not backed by core-mm".
Yeah :) 'mm backed' is definitely too broad for this.

Will reinstate the explicit droppable check in 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