From: Enze Li <lienze@kylinos.cn>
To: sj@kernel.org, akpm@linux-foundation.org
Cc: damon@lists.linux.dev, linux-mm@kvack.org, enze.li@gmx.com,
Enze Li <lienze@kylinos.cn>
Subject: [PATCH 0/2] mm/damon: export symbols and introduce prdm module
Date: Mon, 15 Dec 2025 22:20:55 +0800 [thread overview]
Message-ID: <20251215142057.588500-1-lienze@kylinos.cn> (raw)
This patchset makes DAMON's advanced memory management accessible to a
broader range of users through two complementary enhancements. First,
it exports the necessary DAMON core symbols to enable building loadable
kernel modules. Building on this foundation, it then introduces the
'prdm' module, which extends the concept from the DAMON sample code
(prcl.c) into a production-ready, user-friendly tool.
The key strength of this module is its out-of-the-box simplicity: by
simply specifying the PIDs of target processes and enabling the module,
users can concurrently monitor memory access patterns across multiple
processes and trigger proactive reclamation automatically. This
significantly lowers the barrier to using DAMON, allowing system
administrators and regular users without deep kernel expertise to easily
apply sophisticated memory optimization.
The goal is to help alleviate system-wide memory pressure and improve
performance for various workloads, advancing DAMON from a
developer-centric tool towards a practical solution for a wider
audience.
To test this 'prdm' module, you can follow these steps,
# modprobe prdm
# cd /sys/module/prdm/parameters
# echo <target1_pid> > damon_prdm.target_pid
# echo <target2_pid> > damon_prdm.target_pid
# echo <target3_pid> > damon_prdm.target_pid
# cat damon_prdm.target_pid
Tasks: <target1_pid> <target2_pid> <target3_pid>(exited)
# echo Y > damon_prdm.enabled
To stop the monitoring,
# echo N > damon_prdm.enabled
# rmmod prdm
Enze Li (2):
mm/damon/core: export necessary symbols
mm/damon/modules: introduce prdm module for DAMON
mm/damon/Kconfig | 2 +
mm/damon/Makefile | 1 +
mm/damon/core.c | 10 ++
mm/damon/modules/Kconfig | 18 +++
mm/damon/modules/Makefile | 3 +
mm/damon/modules/prdm.c | 251 ++++++++++++++++++++++++++++++++++++++
6 files changed, 285 insertions(+)
create mode 100644 mm/damon/modules/Kconfig
create mode 100644 mm/damon/modules/Makefile
create mode 100644 mm/damon/modules/prdm.c
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
--
2.52.0
next reply other threads:[~2025-12-15 14:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-15 14:20 Enze Li [this message]
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
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=20251215142057.588500-1-lienze@kylinos.cn \
--to=lienze@kylinos.cn \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=enze.li@gmx.com \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.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