linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Enze Li <lienze@kylinos.cn>
Cc: SeongJae Park <sj@kernel.org>,
	akpm@linux-foundation.org, damon@lists.linux.dev,
	linux-mm@kvack.org, enze.li@gmx.com
Subject: Re: [RFC PATCH 0/2] mm/damon: Introduce basic auto-tuning framework with priority support
Date: Thu, 11 Dec 2025 19:38:04 -0800	[thread overview]
Message-ID: <20251212033804.40832-1-sj@kernel.org> (raw)
In-Reply-To: <20251209145026.3263754-1-lienze@kylinos.cn>

On Tue,  9 Dec 2025 22:50:24 +0800 Enze Li <lienze@kylinos.cn> wrote:

Sorry for late response!

> 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.

I cannot agree this more!

> 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.

How difficult watermarks tuning is?  Do you have some real use case or
realistic benchmarks showing it?  Could you please share that?

> 
> 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.

I agree your points.  In-kernel auto-tuning is much more efficient and simple
to use, compared to user-space based ones.  Nonetheless, the disadvantage of
in-kernel auto-tuning is it increases the maintenace burden.  I'd like to add
lengthy change only if it shows clear benefit.

From this cover letter, I show only "potential" future benefits that might not
land on the real world.  Do you have some real use case or realistic benchmarks
showing the benefit you explained above?  If so, could you please share those?


Thanks,
SJ

[...]


      parent reply	other threads:[~2025-12-12  3:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2025-12-09 14:50 ` [RFC PATCH 2/2] mm/damon/sysfs: introduce priority sysfs interface Enze Li
2025-12-12  3:38 ` SeongJae Park [this message]

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=20251212033804.40832-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --cc=enze.li@gmx.com \
    --cc=lienze@kylinos.cn \
    --cc=linux-mm@kvack.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