Re: [PATCH 1/4] mm: Move demotion related functions in memory-tiers.c

Joshua Hahn
2026-03-11T14:55:54Z

On Wed, 11 Mar 2026 12:02:40 +0100 Alexandre Ghiti <alex@ghiti.fr> wrote:

> Let's have all the demotion functions in this file, no functional
> change intended.

Hi Alexandre,

I hope you are doing well! Thank you for the patch.

Makes sense to move the migration functions together. Just one small
nit, I think the following comment is pretty helpful in understanding
that folios that aren't demoted still remain in @demote_folios. Should
we also move this comment to memory-tiers.c?

[...snip...]

> -/*
> - * Take folios on @demote_folios and attempt to demote them to another node.
> - * Folios which are not demoted are left on @demote_folios.
> - */
> -static unsigned int demote_folio_list(struct list_head *demote_folios,
> - struct pglist_data *pgdat,
> - struct mem_cgroup *memcg)
> -{
> - int target_nid;
> - unsigned int nr_succeeded;
> - nodemask_t allowed_mask;
> -

[...snip...]

Anyways, the rest looks good to me. Have a great day!
Joshua