Re: [PATCH 0/15] mm: introduce ANON_VMA_LAZY for deferred anon_vma creation

From: Harry Yoo

Date: Tue Jun 02 2026 - 12:16:42 EST


On 5/27/26 8:01 PM, tao wrote:
> Design overview
> ---------------
>
> ANON_VMA_LAZY defers anon_vma allocation until it is actually needed
> (for example during fork). VMAs that never participate in sharing can
> avoid creating anon_vma structures entirely.
>
> Before an anon_vma exists, rmap operations rely directly on VMA
> information, so no anon_vma locking is required. An anon_vma is created
> and linked only when sharing semantics are required.

It is unfortunate that the design overview doesn't cover correctness
aspect at all. VMAs are subject to change (even before being shared with
other processes), and rmap needs something that doesn't go away across
VMA merging, split, etc.

I'm not sure how the idea is supposed work correctly.

--
Cheers,
Harry / Hyeonggon

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature