Re: [PATCH v2 2/4] mm: allow shared folios to be promoted to a fast tier

From: Gregory Price

Date: Fri Sep 18 2026 - 10:20:48 EST


On Fri, Sep 18, 2026 at 02:53:40PM +0200, David Hildenbrand (Arm) wrote:
> On 9/11/26 02:18, Gregory Price wrote:
> > From: "Gregory Price (Meta)" <gourry@xxxxxxxxxx>
> >
> > NUMA balancing rejects shared copy-on-write folios and executable
> > file folios mapped by multiple processes to avoid placement bouncing.
> > These checks also block promotion from slow memory.
>
> Right. How to we know the direction of promotion vs. demotion, though?
>

numa balancing never demotes. It either:

1) moves between sockets (nodes w/ N_CPU) (NORMAL)
or
2) moves from !top_tier to top_tier (TIERING)

Demotion is only enacted in reclaim / vmscan, and has no coupling with
numa balancing.

> > + if (vma_is_cow_mapping(vma) && folio_maybe_mapped_shared(folio) &&
> > + !folio_use_access_time(folio))
>
>
> While I understand a "!node_is_toptier(node)" to say "this is a slow tier", I am
> clueless about the folio_use_access_time() check.
>
> Confusing.
>

agree, and agree with Zi's request to rename. I can add that to the end
of the series as well if you like (avoid backport headaches).

~Gregory