Re: [PATCH v6 02/39] mm/vma: introduce and use vma_[flags_]can_merge()
flat view
From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-10-13 15:20:27
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 10/13/26 17:04, Lorenzo Stoakes (ARM) wrote:
Replace the open-coded VMA_SPECIAL_FLAGS check in the VMA merge logic with
two new functions vma_flags_can_merge() and vma_can_merge() and update the
merge logic to use the former.
This abstracts the check and expresses it in terms of the desired behaviour
rather than an arbitrary and confusing VMA flag.
This also lays the groundwork for making further improvements in VMA flag
usage.
Also update the userland VMA tests to reflect the change.
No functional change intended.
Reviewed-by: Gregory Price (Meta) <gourry@gourry.net>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Signed-off-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
---
I'd have called it "vma_mergable" etc, because "can_merge" makes me imply a
"with what".
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David