Re: [PATCH v3 03/15] mm: abstract vma_address() and introduce vma_anon_address()

Gregory Price <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kvack.linux-mm
Message-ID <amrw2v7TVl_AG5_3@gourry-fedora-PF4VCD3F>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.