[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231121053604.60798-1-sj@kernel.org>
Date: Tue, 21 Nov 2023 05:36:01 +0000
From: SeongJae Park <sj@...nel.org>
To: unlisted-recipients:; (no To-header on input)
Cc: SeongJae Park <sj@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
damon@...ts.linux.dev, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 0/2] mm/damon: export DAMON symbols and add sample loadable modules
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
Powered by blists - more mailing lists