Re: [RFC PATCH 4/5] mm: add page implyreclaim flag

From: Lincheng Yang
Date: Mon Oct 09 2023 - 23:28:01 EST


On Sun, Oct 08, 2023 at 12:07:49PM +0100, Matthew Wilcox wrote:
> On Sun, Oct 08, 2023 at 05:59:23PM +0800, Lincheng Yang wrote:
> > Add implyrecalim flag means that the page is reclaim from the user advise.
> > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> > index a2c83c0100aa..4a1278851d4b 100644
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -138,6 +138,7 @@ enum pageflags {
> > #endif
> > PG_hot,
> > PG_cold,
> > + PG_implyreclaim,
> > __NR_PAGEFLAGS,
>
> Can you do all of this without adding three page flags? We're really
> tight on page flags. At a minimum, this is going to have to go behind
> an ifdef that depends on 64BIT, but it'd be better if we can derive
> hot/cold/implyreclaim from existing page flags. Look at the antics

Sounds good, we will try to do it with the exist page flags, if the exist page
flags does not achieve our goal, we will use an ifdef that depends on 64BIT.

> we go through for PG_young and PG_idle; if we had two page flags free,
> we'd spend them on removing the special cases there.
>