linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] mm/damon: Introduce basic auto-tuning framework with priority support
@ 2025-12-09 14:50 Enze Li
  2025-12-09 14:50 ` [RFC PATCH 1/2] mm/damon/auto-tuning: introduce DAMON-based auto-tunning module Enze Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Enze Li @ 2025-12-09 14:50 UTC (permalink / raw)
  To: sj, akpm; +Cc: damon, linux-mm, enze.li, Enze Li

Currently, users need to manually tune multiple parameters (e.g.,
watermarks, quotas) for different workloads when using DAMON.  This
increases the barrier to entry and complicates adoption.  This patchset
aims to lower this barrier by introducing a basic auto-tuning
framework for DAMON, which allows the system to automatically adapt
DAMON's operational parameters based on user-provided hints and system
state.

The core idea is to allow users to assign a simple priority level to
each monitoring target.  Based on these priorities and the current system
conditions (initially focusing on free memory), the framework
dynamically adjusts DAMON's parameters.  The initial implementation
focuses on the automatic management of watermarks.

While the auto-tuning functionality could be implemented in user space
as a separate daemon, integrating it directly into the DAMON kernel
subsystem offers distinct advantages essential for a memory management
automation feature.  First, it delivers superior performance and
real-time responsiveness by executing tuning logic within the monitoring
thread (kdamond) context, eliminating the latency and overhead of
frequent kernel-user space context switches and system calls.  This
ensures parameter adjustments can keep pace with DAMON's monitoring
cycles.  Second, it provides inherent reliability as the tuning logic
becomes an integral part of the DAMON context, immune to failures of any
user-space process (e.g., termination by the OOM killer) and requiring
no additional service management.  Finally, it offers a simplified,
out-of-the-box experience where users enable auto-tuning through a
single configuration without needing to install, maintain, or ensure
version compatibility of an external tool.  This kernel-based approach
aligns with the goal of creating a robust, low-overhead, and truly
self-adaptive memory management subsystem.

You may want to verify this framework using the following testing
procedure:

 # git clone -b v2 https://github.com/lienze/damo.git
 # cd damo
 # ./damo start --target_pid $(pidof <target1>) --priority 50 \
 --target_pid $(pidof <target2>) --priority 30 --damos_action \
 pageout

Enze Li (2):
  mm/damon/auto-tuning: introduce DAMON-based auto-tunning module
  mm/damon/sysfs: introduce priority sysfs interface

 include/linux/damon.h  |   3 +
 mm/damon/Kconfig       |  11 ++
 mm/damon/Makefile      |   1 +
 mm/damon/auto-tuning.c | 244 +++++++++++++++++++++++++++++++++++++++++
 mm/damon/auto-tuning.h |  10 ++
 mm/damon/core.c        |  11 ++
 mm/damon/sysfs.c       |  41 +++++++
 7 files changed, 321 insertions(+)
 create mode 100644 mm/damon/auto-tuning.c
 create mode 100644 mm/damon/auto-tuning.h

-- 
2.52.0



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

end of thread, other threads:[~2025-12-12  3:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-09 14:50 [RFC PATCH 0/2] mm/damon: Introduce basic auto-tuning framework with priority support Enze Li
2025-12-09 14:50 ` [RFC PATCH 1/2] mm/damon/auto-tuning: introduce DAMON-based auto-tunning module Enze Li
2025-12-09 14:50 ` [RFC PATCH 2/2] mm/damon/sysfs: introduce priority sysfs interface Enze Li
2025-12-12  3:38 ` [RFC PATCH 0/2] mm/damon: Introduce basic auto-tuning framework with priority support SeongJae Park

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