Thread (97 messages) 97 messages, 7 authors, 3h ago

Re: [PATCH v2 04/33] mm: introduce and use vma_end_pgoff()

From: "Zi Yan" <ziy@nvidia.com>
Date: 2026-07-18 02:35:16
Also in: damon, kvm, linux-arm-msm, linux-fsdevel, linux-iommu, linux-mm, linux-perf-users, linux-tegra, lkml, nvdimm

On Fri Jul 10, 2026 at 4:16 PM EDT, Lorenzo Stoakes wrote:
We already have vma_last_pgoff() which retrieves the last page offset
within a VMA.

However, code often wishes to span a page offset range, which requires the
exclusive end of this range.

So provide this in vma_end_pgoff() and update vma_last_pgoff() to use this
function.

Also update the VMA userland tests to reflect the change.

No functional change intended.

Reviewed-by: Gregory Price <gourry@gourry.net>
Reviewed-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Signed-off-by: Lorenzo Stoakes <ljs@kernel.org>
---
 include/linux/mm.h              | 19 ++++++++++++++++++-
 tools/testing/vma/include/dup.h |  5 +++++
 2 files changed, 23 insertions(+), 1 deletion(-)
LGTM.

Reviewed-by: Zi Yan <ziy@nvidia.com>

-- 
Best Regards,
Yan, Zi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help