Re: [PATCH v3 2/7] mm: allow shared folios to be promoted to a fast tier
From: Gregory Price
Date: Thu Sep 24 2026 - 10:14:36 EST
On Thu, Sep 24, 2026 at 01:59:15PM +0200, David Hildenbrand (Arm) wrote:
> I wonder if a better name would just make the comment above (about memory
> tiering) implicit and make more sense of the sysctl_numa_balancing_mode &
> NUMA_BALANCING_MEMORY_TIERING) check.
>
> folio_promotable()
>
> folio_is_promotable()
>
> folio_numa_promotable()
>
> etc.
>
> because that seems to be what we really test with both things combined.
>
maybe: folio_numab_promotable() ?
> > - if ((vma->vm_flags & VM_EXEC) && folio_maybe_mapped_shared(folio))
> > + if ((vma->vm_flags & VM_EXEC) &&
> > + folio_maybe_mapped_shared(folio) &&
> > + (!folio_in_lowtier(folio) || !node_is_toptier(node)))
> > return -EACCES;
> >
> > /*
>
> Sashiko has some comment about anonymous shared COW folios. I think it has a
> point, but didn't look too closely.
>
its tl;dr:
`skipping this check means those folios could end up freely migrating east-west
between slow tiers`
Which cannot happen (we only migrate to top tier, numab will never
migrate *to* a slow tier).
basically false-positive
~Gregory