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

From: Matthew Wilcox
Date: Sun Oct 08 2023 - 07:08:33 EST


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
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.