Re: [PATCH 1/4] mm: Move demotion related functions in memory-tiers.c
From: Alexandre Ghiti
Date: Fri Mar 13 2026 - 10:12:29 EST
Hi Joshua,
On 3/11/26 15:55, Joshua Hahn wrote:
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 functionalHi Alexandre,
change intended.
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?
You're totally right, my bad! I'll add the comment in the next version.
[...snip...]
-/*[...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;
-
Anyways, the rest looks good to me. Have a great day!
Joshua
Thanks!
Alex