Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Revert "mm: rename alloc_demote_folio to alloc_migrate_folio"

This reverts commit 8f75267d22bdf8e3baf70f2fa7092d8c2f58da71.

Commit 8f75267d22bd ("mm: rename alloc_demote_folio to
alloc_migrate_folio") was to reflect the fact the function is called for
not only demotion, but also general migrations from
DAMOS_MIGRATE_{HOT,COLD}. The previous commit made the DAMOS actions to
not use alloc_migrate_folio(), though. So, demote_folio_list() is the
only caller of alloc_migrate_folio(), and the name could now be rather
confusing. Revert the renaming commit.

Link: https://lkml.kernel.org/r/20250616172346.67659-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Honggyu Kim <honggyu.kim@sk.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

SeongJae Park and committed by
Andrew Morton
29ea0409 b435415e

+3 -3
+1 -1
mm/internal.h
··· 1226 1226 unsigned long, unsigned long); 1227 1227 1228 1228 extern void set_pageblock_order(void); 1229 - struct folio *alloc_migrate_folio(struct folio *src, unsigned long private); 1229 + struct folio *alloc_demote_folio(struct folio *src, unsigned long private); 1230 1230 unsigned long reclaim_pages(struct list_head *folio_list); 1231 1231 unsigned int reclaim_clean_pages_from_list(struct zone *zone, 1232 1232 struct list_head *folio_list);
+2 -2
mm/vmscan.c
··· 1006 1006 mapping->a_ops->is_dirty_writeback(folio, dirty, writeback); 1007 1007 } 1008 1008 1009 - struct folio *alloc_migrate_folio(struct folio *src, unsigned long private) 1009 + struct folio *alloc_demote_folio(struct folio *src, unsigned long private) 1010 1010 { 1011 1011 struct folio *dst; 1012 1012 nodemask_t *allowed_mask; ··· 1069 1069 node_get_allowed_targets(pgdat, &allowed_mask); 1070 1070 1071 1071 /* Demotion ignores all cpuset and mempolicy settings */ 1072 - migrate_pages(demote_folios, alloc_migrate_folio, NULL, 1072 + migrate_pages(demote_folios, alloc_demote_folio, NULL, 1073 1073 (unsigned long)&mtc, MIGRATE_ASYNC, MR_DEMOTION, 1074 1074 &nr_succeeded); 1075 1075