On Mon, Jul 20, 2026 at 12:48:12PM -0700, Andrew Morton wrote: > On Mon, 20 Jul 2026 15:38:26 +0100 "Lorenzo Stoakes (ARM)" <[email protected]> > wrote: > > > In memory management we've managed to manufacture a great deal of confusion > > around the concept of anonymous memory. We have: > > > > 1. 'Pure anon' memory - anonymous VMAs whose folios are anonymous and > > swap-backed (thus for reclaim purposes, treated as anonymous). These are > > simple enough. > > > > 2. shmem - file-backed VMAs, file-backed folios (from rmap perspective) so > > present in the page cache and mapped by an address_space object, but > > whose folios are also swap-backed (thus treated as anonymous for reclaim > > purposes). > > > > 3. MAP_PRIVATE-mapped /dev/zero - a strange beast whose VMAs have > > vma->vm_file set, but whose mmap_prepare callback clears vma->vm_ops to > > satisfy vma_is_anonymous(), which results in VMAs that were mmap()'d > > referencing a file, but are in every other sense anonymous, including the > > folios. > > > > 4. Other MAP_PRIVATE-file backed mappings - These possess file-backed VMAs > > and have file-backed folios until CoW'd, at which point those CoW'd > > folios are anonymous. > > > > This series fixes issues 3 and 4. > > Thanks, I'll add this to mm-new for review-n-test. > > AI review seems overloaded at present, might have found a few things: > > https://sashiko.dev/#/patchset/[email protected] >
Thanks, will have a look through the sashiko stuff and see what's valid. Cheers, Lorenzo

