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

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

From: Lorenzo Stoakes <ljs@kernel.org>
Date: 2026-07-10 14:56:57
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 09, 2026 at 11:49:18AM -0400, Gregory Price wrote:
On Thu, Jul 02, 2026 at 12:30:59PM +0100, Lorenzo Stoakes wrote:
quoted
...
quoted
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;
}
...
quoted
And I'm not sure it's really all that useful. Perhaps retaining vma_offset()
would be though.
Silly question:
There's no such thing :)
   What's the purpose of retaining tags in a non-address value?
Well if you want to reconstitute an address from it later then that'd be the
intent, but I'm being hand wavey here for sure.

Main thing is to retain stuff under the page mask
That sounds like there's fragility just waiting to be broken.

(I presume you are talking about things like ARM MTE and such, right?)
quoted
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.
Yeah this series is huge enough as it is :P
~Gregory
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