Re: [PATCH v3 03/15] mm: abstract vma_address() and introduce vma_anon_address()
From: Gregory Price
Date: Thu Jul 30 2026 - 02:51:43 EST
On Thu, Jul 30, 2026 at 12:58:22AM -0400, Gregory Price wrote:
> On Wed, Jul 29, 2026 at 05:48:38PM +0100, Lorenzo Stoakes (ARM) wrote:
> >
> > This will be necessary for determining the address of a folio's index
> > within a VMA when the folio belongs to a MAP_PRIVATE file-backed VMA but
> > has been CoW'd, and thus is anonymous, once the anonymous VMA page offset
> > field is used for the reverse mapping.
> >
>
> This is a doozy of a sentence...
>
> ... determines the address of a folio's index within a VMA when
> - the folio belongs to a MAP_PRIVATE file-backed VMA, but
> - <The VMA> has been cow'd
> - thus <The CoW'd VMA> is anonymous (as well)
> - The original VMA may or may not also be marked anonymous?
> (just clarifying, could be original mapper or a COW that COWs)
>
> Ow, my brain. One question below
>
After re-reading the cover-letter again - my note here is wrong and
my brain hurts more.
... determines the address of a folio's index within a VMA when
- the folio belongs to a MAP_PRIVATE file-backed VMA, but
- <The Folio> has been CoW'd
- thus <The CoW'd Folio> is <now marked> anonymous
- The original folio may or may not have been anonymous
(depending on whether it, itself, was a CoW copy)
Lorenzo you are truly doing Darwin's work untangling all of this.
~Gregory