Re: [PATCH 1/2] mm/rmap: use vm_pgoff for anonymous VMAs in linear_anon_page_index()
From: Lorenzo Stoakes (ARM)
Date: Tue Nov 10 2026 - 10:07:26 EST
On Tue, Nov 10, 2026 at 11:25:13AM +0000, Pedro Falcato wrote:
> I trust Lorenzo knows more about his plans to use anon_pgoff than I do,
> so I'll let him reply. A comment though:
Thanks.
I'm taking over the series rather than replying further, as is general practice
with this kind of submission.
Will post something in a little while.
>
> > Measured on an AMD EPYC 9634 (84 cores, 12 CCDs, CONFIG_DEBUG_VM=n), on
> > mainline after v7.4-rc1 (the base of this series). Threads share one
> > anonymous VMA, each faults its own slice and zaps it with MADV_DONTNEED;
> > faults/s, median of 3:
> >
> > CPUs base patched
> > 1 CCD, 7 threads 2.360M 2.369M +0.4%
> > 7 CCDs, 1 thread each 1.738M 1.982M +14.0%
>
> This is not particularly surprising. CCDs have their own L3 cache. I'm not
> surprised the coherency penalty is much higher cross-CCD.
Right. And a lot of these workloads seem to work backwards from the problem
'let's find the worst possible scenario for this, then microbenchmark it,
surprise it turns out it performs badly'.
Even the real-world usecase (no citation as to _actually_ encountering it) seems
to follow the same pattern.
I expect we'll continue to see more of this stuff over time, sigh.
In any case, the solution seems to be the same in general - don't do this check
in non-debug.
--
Cheers, Lorenzo