From: SeongJae Park <sj@kernel.org>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: SeongJae Park <sj@kernel.org>,
Bijan Tabatabai <bijan311@gmail.com>,
damon@lists.linux.dev, Bijan Tabatabai <bijantabatab@micron.com>
Subject: Re: [PATCH] mm/damon/vaddr: avoid unnecessary migration between target nodes
Date: Tue, 5 Aug 2025 10:51:10 -0700 [thread overview]
Message-ID: <20250805175110.7589-1-sj@kernel.org> (raw)
In-Reply-To: <CAC5umyjp_tbcJ3=UdSv0WCiOWytW3arBYp3nwv9i2V24ENmmPw@mail.gmail.com>
On Wed, 6 Aug 2025 01:04:47 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote:
> 2025年8月5日(火) 1:43 SeongJae Park <sj@kernel.org>:
> >
> > On Mon, 4 Aug 2025 10:19:20 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:
> >
> > > On Mon, 4 Aug 2025 21:46:49 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > 2025年8月4日(月) 3:01 SeongJae Park <sj@kernel.org>:
> > > > >
> > > > > Hello Akinobu,
> > > > >
> > > > > On Sun, 3 Aug 2025 22:00:28 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote:
> > > > >
> > > > > > This change avoids unnecessary migration by checking if the folio to which
> > > > > > the migration is applied is already located in one of the target nodes.
[...]
> > Agreed. If Akinobu's use case is not depend on virtual address space, I think
> > paddr is a feasible direction to go. Note that 'paddr' doesn't support
> > multiple destination nodes for now, so development of that would be needed if
> > we decide to go in this way. But, again, I'd love to learn more about
> > Akinobu's use case and the problem first.
>
> In my use case, a script periodically checks the processes in a cgroup and adds
> new processes to the monitor targets, so the target processes change over time.
> (Processes known to be short-lived or have low memory usage are excluded)
Thank you for sharing this!
I'm curious in more details, though. Could you share what you want to achieve
with it, what DAMON parameters you are using for that, and how well or bad the
results match with your expectation?
>
> As you point out, even without the patch I suggested, it seems unlikely that
> continuous migration between target nodes would occur. The reason I proposed
> this patch is that I didn't want to move any pages that were already located in
> one of the target nodes.
>
> It's true that paddr is more suitable, so I'd like to evaluate it using paddr
> and compare which one is better.
Soudns good, I'm looking forward to the evaluation results! Let me know if any
help is needed.
> However, these processes have different
> performance requirements, so vaddr may be a better choice as it may be possible
> to extend special handling depending on the target process.
We have implemented memcg type DAMOS filter[1] for such a case. You can use
the filter to make a given DAMOS scheme's action be applied to only pages that
owned by specific cgroups or not.
We also recently posted an RFC patch series[2] for memcg-aware auto-tuned
memory tiering. The RFC patch series is not yet upstreamed since I found no
time to further test it. It would be helpful if you could test and share the
results.
Again, I'm looking forward to more details of your use case and evaluation
results. Let me know if there is anything I can help.
[1] https://docs.kernel.org/mm/damon/design.html#filters
[2] https://lore.kernel.org/20250619220023.24023-1-sj@kernel.org
Thanks,
SJ
prev parent reply other threads:[~2025-08-05 17:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 13:00 [PATCH] mm/damon/vaddr: avoid unnecessary migration between target nodes Akinobu Mita
2025-08-03 18:01 ` SeongJae Park
2025-08-04 12:46 ` Akinobu Mita
2025-08-04 15:19 ` Bijan Tabatabai
2025-08-04 16:43 ` SeongJae Park
2025-08-05 16:04 ` Akinobu Mita
2025-08-05 17:51 ` SeongJae Park [this message]
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=20250805175110.7589-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=bijan311@gmail.com \
--cc=bijantabatab@micron.com \
--cc=damon@lists.linux.dev \
/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.