Skip to content

mm/damon: export DAMON symbols and add sample loadable modules

SeongJae Park damon linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/damon/core: export symbols for supporting loadable modulesmm/damon/core.c+10 -00 replies
2/3samples: add working set size estimation DAMON sample moduleMAINTAINERS samples/Kconfig samples/Makefile +3 more+109 -00 replies
3/3samples: add proactive reclamation DAMON sample modulesamples/damon/Kconfig samples/damon/Makefile samples/damon/damon_sample_prcl.c+116 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] mm/damon: export DAMON symbols and add sample loadable modules

Changes from RFC
(https://lore.kernel.org/damon/[email protected]/)
- Wordsmith commit message
- Use GPL v2 for Makefile
- Separate patch for each sample module

DAMON cannot be used from loadable modules since it is not exporting its symbols. This makes use of DAMON unnecessarily tedious. For example, basic usage of DAMON was presented 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, it 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 updated DAMON programming 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 add the kernel summit 2021's modules that updated for latest DAMON API under the samples directory. The sample modules will be keep updated. For exporting more symbols, requesters would be required to merge their modules using the symbols in the tree together, or updsate the sample modules to use the newly-exporting symbols in still simple but reasonable ways.

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

SeongJae Park (3):
mm/damon/core: export symbols for supporting loadable modules
samples: add working set size estimation DAMON sample module
samples: add proactive reclamation DAMON sample module

 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 | 102 ++++++++++++++++++++++++++++++
 samples/damon/damon_sample_wsse.c |  85 +++++++++++++++++++++++++
 8 files changed, 235 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: 7fcebba4a540e4508b923f00a3e9c5e4710f147f

Signature · 1 line
2.34.1