Re: [PATCH RFC 09/15] mm/mglru: frequency guided workingset promotion (MGLRU-FG)

From: Kairui Song

Date: Sat Aug 15 2026 - 05:20:51 EST


On Sat, Aug 15, 2026 at 8:13 AM Barry Song <baohua@xxxxxxxxxx> wrote:
>
> On Sat, Aug 15, 2026 at 2:06 AM Kairui Song <ryncsn@xxxxxxxxx> wrote:
> >
> > Thanks very much for the review and suggestion!
> >
> > Good idea, but to distinguish from macros like LRU_REFS_PROTECTED and
> > LRU_REFS_WORKINGSET, which are special referenced count number, maybe
> > LRU_REF_EXEC and LRU_REF_FAULT? BTW we have macros like
> > FOLIOREF_RECLAIM_CLEAN, FOLIOREF_KEEP, and folio_referenced, etc.,
> > which are commonly used already, that's one main hint behind the name
> > choice here.
>
> Yep, LRU_REF_FAULT and LRU_REF_EXEC sound good to me.
>
> BTW, is FAULT really the right term here? It looks like you're
> actually using it to indicate the result of PTE scanning.
>
> In the other place, you use "promote" instead:
>
> +static inline int folio_inc_lru_refs(struct folio *folio, bool
> promote, bool is_exec)
> +{
> + return 0;
> +}
>
> So perhaps LRU_REF_MAPPED would be more appropriate?

Sound reasonalbe, it idea behind that name is that if the folio is
evicted, that access will cause a major fault. I'm fine with both
name.