linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/damon: export symbols and introduce prdm module
@ 2025-12-15 14:20 Enze Li
  2025-12-15 14:20 ` [PATCH 1/2] mm/damon/core: export necessary symbols Enze Li
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Enze Li @ 2025-12-15 14:20 UTC (permalink / raw)
  To: sj, akpm; +Cc: damon, linux-mm, enze.li, Enze Li

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



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-12-22 21:33 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-15 14:20 [PATCH 0/2] mm/damon: export symbols and introduce prdm module 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
2025-12-22  7:08       ` Enze Li
2025-12-22 15:21         ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox