damon.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/2] mm/damon: export DAMON symbols and add sample loadable modules
Date: Tue, 21 Nov 2023 05:36:01 +0000	[thread overview]
Message-ID: <20231121053604.60798-1-sj@kernel.org> (raw)

DAMON cannot be used from loadable modules since it is not exporting its
symbols.  This makes use of DAMON unnecessarily tedious.  For example,
we presented basic usge of DAMON at kernel summit 2021[1] by writing
simple loadable DAMON application modules in live.  Because the time was
limited (10 minutes) and the coding was to be done step by step, we had
to make a downstream commit that exports DAMON symbols.  There were
users asking why the source code is now not working.  It was mainly due
to the absence of the symbols export patch on their tree, but also due
to the changed DAMON interfaces.  There were also multiple users
requesting support of loadable modules for easier deployment.

There's no reason to avoid exporting DAMON symbols.  However, it would
be better to have concrete use cases of the symbols in the tree
together, for better maintenance of the interface and the use cases.
The kernels summit 2021's live-coded modules could be used for the
purpose.

Expose DAMON API modules for supporting the minimum modules and and add
the kernel summit 2021's modules that updated for latest DAMON API under
the samples directory.  We will keep update of the sample modules.  For
exporting more symbols, requesters would be required to merge their
modules using it in the tree together, or updsate the sample modules to
use the newly-exporting symbols in reasonable and still simple ways.

[1] https://linuxplumbersconf.org/event/11/contributions/984/

SeongJae Park (2):
  mm/damon/core: export symbols for supporting loadable modules
  samples: add DAMON sample kernel modules

 MAINTAINERS                       |  1 +
 mm/damon/core.c                   | 10 ++++
 samples/Kconfig                   |  2 +
 samples/Makefile                  |  2 +
 samples/damon/Kconfig             | 30 ++++++++++
 samples/damon/Makefile            |  3 +
 samples/damon/damon_sample_prcl.c | 98 +++++++++++++++++++++++++++++++
 samples/damon/damon_sample_wsse.c | 80 +++++++++++++++++++++++++
 8 files changed, 226 insertions(+)
 create mode 100644 samples/damon/Kconfig
 create mode 100644 samples/damon/Makefile
 create mode 100644 samples/damon/damon_sample_prcl.c
 create mode 100644 samples/damon/damon_sample_wsse.c


base-commit: 79cc930e5e3dc73c972d9e422b5e2ab3fe56dce5
-- 
2.34.1


             reply	other threads:[~2023-11-21  5:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  5:36 SeongJae Park [this message]
2023-11-21  5:36 ` [RFC PATCH 1/2] mm/damon/core: export symbols for supporting loadable modules SeongJae Park
2023-11-21  5:36 ` [RFC PATCH 2/2] samples: add DAMON sample kernel modules 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=20231121053604.60798-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).