From: SJ Park <sj@kernel.org>
To: Aveline Noir <jm5905938@gmail.com>
Cc: SJ Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Bijan Tabatabai <bijan311@gmail.com>,
Bijan Tabatabai <bijantabatab@micron.com>
Subject: Re: [PATCH] mm/damon: skip folios already on the migration target node
Date: Wed, 28 Oct 2026 18:01:43 -0700 [thread overview]
Message-ID: <20261029010144.169906-1-sj@kernel.org> (raw)
In-Reply-To: <179320218513.2.7432933245840036676.damon-same-node-skip@gmail.com>
On Thu, 29 Oct 2026 00:05:46 +1100 Aveline Noir <jm5905938@gmail.com> wrote:
> While measuring DAMOS migration overhead, I found that the target_nid
> path isolates folios already on the target node, then puts them back on
> the LRU without migrating them.
>
> Skip them before isolation in vaddr and paddr, as the vaddr explicit
> destinations path already does.
Nice catch!
>
> Signed-off-by: Aveline Noir <jm5905938@gmail.com>
Other than below trivial nit,
Reviewed-by: SJ Park <sj@kernel.org>
>
> ---
> DAMON KUnit and selftests all passed. In a synthetic same-node fvaddr
> test on a two-node x86-64 KVM guest (8 interleaved runs per kernel),
> guest-kernel cycles fell by about 29%
> with 4 KiB regions and 90% with 16 MiB regions. Median kdamond CPU
> time fell by about 76% with 16 MiB regions, with no clear change
> with 4 KiB regions.
Thank you for sharing the test result. We don't want to add too much test
results in the commit message. But the performance part above is informative
and concise, so I think it deserves to be in the commit message.
> ---
> mm/damon/paddr.c | 2 ++
> mm/damon/vaddr.c | 22 ++++++++++++----------
> 2 files changed, 14 insertions(+), 10 deletions(-)
[...]
> @@ -858,8 +860,8 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
> goto huge_out;
> if (damos_va_filter_out(s, folio, walk->vma, addr, NULL, pmd))
> goto huge_out;
> - damos_va_migrate_dests_add(folio, walk->vma, addr, dests,
> - migration_lists);
> + damos_va_migrate_dests_add(folio, walk->vma, addr, s,
> + migration_lists);
Let's not align parameters on parentheses but just give two tabs indentation.
> huge_out:
> spin_unlock(ptl);
> return 0;
> @@ -883,8 +885,8 @@ static int damos_va_migrate_pmd_entry(pmd_t *pmd, unsigned long addr,
> continue;
> if (damos_va_filter_out(s, folio, walk->vma, addr, pte, NULL))
> continue;
> - damos_va_migrate_dests_add(folio, walk->vma, addr, dests,
> - migration_lists);
> + damos_va_migrate_dests_add(folio, walk->vma, addr, s,
> + migration_lists);
Ditto.
Assuming you accept my humble suggestions above, I applied this patch to
damon/next [1] tree, together with my above suggestions. I will repost it for
mm.git inclusion within a week. So, no action from your side is needed for
now. Let me know if you think changes to the plan or discussions are needed.
[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-10-29 1:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 13:05 [PATCH] mm/damon: skip folios already on the migration target node Aveline Noir
2026-10-28 15:57 ` sashiko-bot
2026-10-29 1:01 ` SJ Park [this message]
2026-10-29 1:06 ` SJ Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261029010144.169906-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bijan311@gmail.com \
--cc=bijantabatab@micron.com \
--cc=damon@lists.linux.dev \
--cc=jm5905938@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.