Thread (140 messages) 140 messages, 10 authors, 16d ago

Re: [PATCH 17/30] mm: prefer vma_[start,end]_pgoff() to vma->vm_pgoff in kernel/

From: Gregory Price <gourry@gourry.net>
Date: 2026-07-09 15:49:26
Also in: damon, dri-devel, kvm, linux-arm-msm, linux-fsdevel, linux-iommu, linux-mm, linux-perf-users, linux-tegra, lkml, nvdimm

On Thu, Jul 02, 2026 at 12:30:59PM +0100, Lorenzo Stoakes wrote:
...
static inline unsigned long vma_offset(const struct vm_area_struct *vma,
				       const unsigned long address)
{
	/* Retains page offset and tags. */
	return address - vma->vm_start;
}
...
And I'm not sure it's really all that useful. Perhaps retaining vma_offset()
would be though.
Silly question:

   What's the purpose of retaining tags in a non-address value?

That sounds like there's fragility just waiting to be broken.

(I presume you are talking about things like ARM MTE and such, right?)
This is one that I think makes more sense.

But in general, I'd rather hold off from yet more churn here.

I'm making these changes to establish a basis for virtual page offsets
introduced in [0], rather than just cleaning up in general.
I agree with this.  If the refactors here suddenly have to think about
corner cases on things like tags, that's better resolved separately.

~Gregory
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help