* [RFC PATCH 0/3] mm/damon: use alloc_migration_target() for DAMOS_MIGRATE_{HOT,COLD}
@ 2025-06-09 20:00 SeongJae Park
2025-06-09 20:00 ` [RFC PATCH 1/3] mm/damon/paddr: use alloc_migartion_target() with no migration fallback nodemask SeongJae Park
0 siblings, 1 reply; 2+ messages in thread
From: SeongJae Park @ 2025-06-09 20:00 UTC (permalink / raw)
Cc: SeongJae Park, Andrew Morton, David Hildenbrand, Honggyu Kim,
Johannes Weiner, Lorenzo Stoakes, Michal Hocko, Qi Zheng,
Shakeel Butt, Simon Wang, damon, kernel-team, linux-kernel,
linux-mm
DAMOS_MIGRATE_{HOT,COLD} implementation resembles that for demotion, and
hence the behavior is also similar to that. But, since those are not
only for demotion but general migrations, it would be better to match
with that for move_pages() system call. Make the implementation and the
behavior more similar to move_pages() by not setting migration fallback
nodes, and using alloc_migration_target() instead of
alloc_migrate_folio().
alloc_migrate_folio() was renamed from alloc_demote_folio() and been
non-static function, to let DAMOS_MIGRATE_{HOT,COLD} call it. As
alloc_migration_target() is called instead, the renaming and non-static
changes are no more required but could only make future code readers
be confused. Revert the changes, too.
SeongJae Park (3):
mm/damon/paddr: use alloc_migartion_target() with no migration
fallback nodemask
Revert "mm: rename alloc_demote_folio to alloc_migrate_folio"
Revert "mm: make alloc_demote_folio externally invokable for
migration"
mm/damon/paddr.c | 4 +---
mm/internal.h | 1 -
mm/vmscan.c | 5 +++--
3 files changed, 4 insertions(+), 6 deletions(-)
base-commit: 7af1516cc219fe5ecc2e2ba01e578a75e955d0b4
--
2.39.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC PATCH 1/3] mm/damon/paddr: use alloc_migartion_target() with no migration fallback nodemask
2025-06-09 20:00 [RFC PATCH 0/3] mm/damon: use alloc_migration_target() for DAMOS_MIGRATE_{HOT,COLD} SeongJae Park
@ 2025-06-09 20:00 ` SeongJae Park
0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2025-06-09 20:00 UTC (permalink / raw)
Cc: SeongJae Park, Andrew Morton, Honggyu Kim, Simon Wang, damon,
kernel-team, linux-kernel, linux-mm
DAMOS_MIGRATE_{HOT,COLD} implementation resembles that for
demote_folio_list(). Because those are not only for demotion but
general folio migrations, it makes more sense to behave similarly to
move_pages() system call. Make the behavior more similar to
move_pages(), by using alloc_migration_target() instead of
alloc_migrate_folio(), without fallback nodemask.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/paddr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 4102a8c5f992..fcab148e6865 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -386,7 +386,6 @@ static unsigned int __damon_pa_migrate_folio_list(
int target_nid)
{
unsigned int nr_succeeded = 0;
- nodemask_t allowed_mask = NODE_MASK_NONE;
struct migration_target_control mtc = {
/*
* Allocate from 'node', or fail quickly and quietly.
@@ -396,7 +395,6 @@ static unsigned int __damon_pa_migrate_folio_list(
.gfp_mask = (GFP_HIGHUSER_MOVABLE & ~__GFP_RECLAIM) |
__GFP_NOWARN | __GFP_NOMEMALLOC | GFP_NOWAIT,
.nid = target_nid,
- .nmask = &allowed_mask
};
if (pgdat->node_id == target_nid || target_nid == NUMA_NO_NODE)
@@ -406,7 +404,7 @@ static unsigned int __damon_pa_migrate_folio_list(
return 0;
/* Migration ignores all cpuset and mempolicy settings */
- migrate_pages(migrate_folios, alloc_migrate_folio, NULL,
+ migrate_pages(migrate_folios, alloc_migration_target, NULL,
(unsigned long)&mtc, MIGRATE_ASYNC, MR_DAMON,
&nr_succeeded);
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-09 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 20:00 [RFC PATCH 0/3] mm/damon: use alloc_migration_target() for DAMOS_MIGRATE_{HOT,COLD} SeongJae Park
2025-06-09 20:00 ` [RFC PATCH 1/3] mm/damon/paddr: use alloc_migartion_target() with no migration fallback nodemask SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox