Re: [PATCH 0/3] mm/damon: use alloc_migrate_target() for DAMOS_MIGRATE_{HOT,COLD}

From: Joshua Hahn
Date: Mon Jun 16 2025 - 17:32:12 EST


On Mon, 16 Jun 2025 10:23:43 -0700 SeongJae Park <sj@xxxxxxxxxx> wrote:

> 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 de-static
> changes are no more required but could only make future code readers be
> confused. Revert the changes, too.

Hi SJ,
I hope you are doing well!

These changes all look good to me. And I agree that changing the behavior
to mimic migration as opposed to demotion might be helpful in making
opportunities for others to use DAMOS as a means to perform other related
works (like [1]), without having to use a "demotion" mechanism for simply
moving pages around.

I do have one question: I'm curious what kinds of changes callers can expect.
Would I be correct in understanding that this is mostly a semantic change
(aside from no longer having a fallback nodemask)? Just want to make sure I
have a correct understanding of your intent was.

In the meantime, feel free to add the following to the series:
Reviewed-by: Joshua Hahn <joshua.hahnjy@xxxxxxxxx>

Have a great day!
Joshua

[1] https://lore.kernel.org/all/20250612181330.31236-1-bijan311@xxxxxxxxx/

Sent using hkml (https://github.com/sjp38/hackermail)