RE: [RFC PATCH v2 00/13] mm: rework anon_vma and remove anon_vma_chain
From: wangtao
Date: Tue Jul 07 2026 - 05:24:25 EST
> >> On 7/7/26 08:32, tao wrote:
> >>> Hi all,
> >>>
> >>> Since v1 was relatively complex and difficult to extend, this
> >>> version adopts a simpler anon_vma implementation approach.
> >>
> >> I really hate to repeat myself, but you seemed to have missed my main
> >> point [1]
> >>
> > I saw it, and I’ve waited for a while as well.
>
> Apparently you saw it but you didn't read my reply about slapping more
> complexity on something complicated.
This v2 is a complete rewrite replacing the original anon_vma and anonymous-page
reverse-mapping traversal.
The new anon_vma hierarchy is represented using a simple doubly linked list with depth information,
replacing the complex topology of red-black trees maintained by each anon_vma in the original design,
and also removing anon_vma_chain.
Excluding patch 11, which optimizes leaf VMA rmap with PVL, and patch 12, which optimizes memory
usage through shared semaphores, the base version contains roughly 800 lines of code, including the
compatibility part replacing the original anon_vma implementation.
>
> 12 files changed, 1056 insertions(+), 54 deletions(-)
>
> >
> > If there are technical issues, please point them out directly.
> > Or is this simply how technical discussions are usually conducted in the
> Linux community or the mm subsystem?
>
> I suggest you go back and read my email.
At first, I thought I was the only one who found anon_vma hard to understand. After reading your earlier email,
I realized that many people also consider it difficult to follow. So I tried a different approach and implemented
anon_vma rmap using a simpler doubly linked list plus depth mechanism.
Thanks,
Tao
> --
> Cheers,
>
> David