[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250609200048.50914-2-sj@kernel.org>
Date: Mon, 9 Jun 2025 13:00:46 -0700
From: SeongJae Park <sj@...nel.org>
To:
Cc: SeongJae Park <sj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Honggyu Kim <honggyu.kim@...com>,
Simon Wang <wangchuanguo@...pur.com>,
damon@...ts.linux.dev,
kernel-team@...a.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: [RFC PATCH 1/3] mm/damon/paddr: use alloc_migartion_target() with no migration fallback nodemask
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@...nel.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
Powered by blists - more mailing lists