linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: JaeJoon Jung <rgbi3307@gmail.com>
Cc: SeongJae Park <sj@kernel.org>, Enze Li <lienze@kylinos.cn>,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, enze.li@gmx.com
Subject: Re: [PATCH 0/2] mm/damon: export symbols and introduce prdm module
Date: Mon, 22 Dec 2025 13:33:40 -0800	[thread overview]
Message-ID: <20251222213341.3687-1-sj@kernel.org> (raw)
In-Reply-To: <CAHOvCC6wQ5h5j42iTaepRnSkA6mqeY-ExpHA4Qc6K+-xb6T0eQ@mail.gmail.com>

On Tue, 23 Dec 2025 05:57:55 +0900 JaeJoon Jung <rgbi3307@gmail.com> wrote:

> On Mon, 22 Dec 2025 at 04:27, SeongJae Park <sj@kernel.org> wrote:
> > On Sun, 21 Dec 2025 20:04:23 +0900 JaeJoon Jung <rgbi3307@gmail.com> wrote:
[...]
> > > So far in my view, I have analyzed DAMON as follows:
> > >
> > > DAMON core  <---------> kernel module   <------> damo(user-space)
> > > mm/damon/core.c         mm/damon/lru_sort.c
> > > mm/damon/vaddr.c        mm/damon/reclaim.c
> > > mm/damon/paddr.c        samples/damon/*.c
> > > mm/damon/sysfs.c
> > >
> > > Above, lru_sort and reclaim are DAMON core characteristics, but they have
> > > a kernel module structure because they are executed with module_init().
> > > I personally think this is inappropriate.
> >
> > Could you please further clarify why you think it is inappropriate?
> >
> > > Additionally, currently, DAMON is
> > > executed only once at a time according to the exclusive=true condition
> > > when damon_start() is called.  In this structure, I believe that the meaning
> > > of "kernel loadable module"  is non-existent.
> >
> > I have to say I still don't get your points.  More elaboration would be nice.
> 
> To summarize the Damon I have analyzed so far,
> 
> DAMON core  <---------------> DAMON kernel module
> | mm/damon/core.c               + mm/damon/lru_sort.c (schemes setting)
> | mm/damon/vaddr.c              + mm/damon/reclaim.c (quota, filter)
> | mm/damon/paddr.c              + samples/damon/*.c (using samples)
> | mm/damon/sysfs.c
>             |
>         /sys/kernel/mm/damon/admin
>             |
>             +--------------------------> open/read(get)/write(set)/close
>                                                (user-space system call)

Nice analysis.  Please consider further referring to the 'overall
architectures' section of the design doc [1].

> 
> The DAMON kernel module above is a sample that sets some parameters of
> DAMON.  I think it's better to use damon/sysfs since all of this can be
> done in damon/sysfs.

I agree using DAMON sysfs only can be better for some use cases.  But nothing
fits all.  Hence we intentionally provide both general purpose user interface
module (DAMON sysfs interface) and special-purpose modules.  Please refer to
the 'modules' section of the design doc [1] for more details.

> I am continuing to analyze this.  If any
> improvements are found, I'll send you a patch.

Looking forward!

[1] https://origin.kernel.org/doc/html/latest/mm/damon/design.html


Thanks,
SJ

[...]


  reply	other threads:[~2025-12-22 21:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 14:20 Enze Li
2025-12-15 14:20 ` [PATCH 1/2] mm/damon/core: export necessary symbols Enze Li
2025-12-15 14:20 ` [PATCH 2/2] mm/damon/modules: introduce prdm module for DAMON Enze Li
2025-12-15 23:16 ` [PATCH 0/2] mm/damon: export symbols and introduce prdm module SeongJae Park
2025-12-18 13:46   ` Enze Li
2025-12-19 11:46     ` SeongJae Park
2025-12-21  2:42       ` JaeJoon Jung
2025-12-21  8:12         ` SeongJae Park
2025-12-21 11:04           ` JaeJoon Jung
2025-12-21 19:27             ` SeongJae Park
2025-12-22 20:57               ` JaeJoon Jung
2025-12-22 21:33                 ` SeongJae Park [this message]
2025-12-22  7:08       ` Enze Li
2025-12-22 15:21         ` SeongJae 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=20251222213341.3687-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=enze.li@gmx.com \
    --cc=lienze@kylinos.cn \
    --cc=linux-mm@kvack.org \
    --cc=rgbi3307@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox