Re: [PATCH] mm/damon: prevent migration fallback to non-target nodes
From: SJ Park
Date: Wed Jul 08 2026 - 10:24:40 EST
Hello jzh,
On Wed, 8 Jul 2026 01:07:54 -0700 zjh <jiahuitry@xxxxxxxxxxx> wrote:
> DAMOS_MIGRATE_{HOT,COLD} passes a target NUMA node to migrate_pages().
> But alloc_migration_target() 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.
>
> Make DAMON migration target allocation strict by setting __GFP_THISNODE.
> This is consistent with alloc_misplaced_dst_folio() and
> alloc_demote_folio(), which also use __GFP_THISNODE for migrations to an
> explicit destination node.
Thank you for sharing this patch. So this patch is introducing a small
behavioral change. May I ask why you think the new behavior is better? Have
you find some negative user impacts from the current behavior?
>
> Signed-off-by: zjh <jiahuitry@xxxxxxxxxxx>
We as the kernel community disallow [1] anonymous patch submissions. Is zjh
your preferred identity? Also, it is not a strict rule, but we as the mm
community prefer using a formal name if that's ok.
[1] https://docs.kernel.org/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
Thanks,
SJ
[...]