Re: [PATCH 1/4] mm: Move demotion related functions in memory-tiers.c
From: Joshua Hahn
Date: Wed Mar 11 2026 - 11:04:03 EST
On Wed, 11 Mar 2026 12:02:40 +0100 Alexandre Ghiti <alex@xxxxxxxx> 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