Re: [PATCH v2] mm/damon/ops-common: prevent migration fallback to non-target nodes

From: SJ Park

Date: Tue Jul 14 2026 - 10:26:16 EST


On Tue, 14 Jul 2026 03:38:17 -0700 Jiahui Zhang <jiahuitry@xxxxxxxxxxx> wrote:

> DAMOS_MIGRATE_{HOT,COLD} passes a target NUMA node to migrate_pages().
> But alloc_migration_target() only treats mtc->nid as a preferred node
> unless __GFP_THISNODE is set. Hence target allocation can fall back
> to another node, and migrate_pages() can report success without placing
> the folio on the requested target node.
[...]

All make sense to me. Thank you for kindly revisioning with the clarification
of the motivation, Jiahui!

> Signed-off-by: Jiahui Zhang <jiahuitry@xxxxxxxxxxx>

Reviewed-by: SJ Park <sj@xxxxxxxxxx>

This patch is applied to damon/next [1] tree. If this patch is not added to
mm.git in short term (~1 week?), I will ask mm.git maintainer (Andrew Morton)
to pick this. So, no action from your side is needed for now. If it seems I
also forgot doing that or you cannot wait for my action, please feel free to
directly ask that to Andrew.

[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees


Thanks,
SJ

[...]