From: SJ Park <sj@kernel.org>
To: Liew Rui Yan <aethernet65535@gmail.com>
Cc: SJ Park <sj@kernel.org>,
Gutierrez Asier <gutierrez.asier@huawei-partners.com>,
damon@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [RFC/Discussion] mm/damon: Helping with alternative for watermarks
Date: Fri, 14 Aug 2026 07:54:13 -0700 [thread overview]
Message-ID: <20260814145414.91204-1-sj@kernel.org> (raw)
In-Reply-To: <20260814084710.39955-1-aethernet65535@gmail.com>
Hi Liew,
On Fri, 14 Aug 2026 16:47:10 +0800 Liew Rui Yan <aethernet65535@gmail.com> wrote:
> Hi SJ,
>
> Regarding the alternative superior feature to replace watermarks [1], I
> am very interested in helping you design and/or implement it.
Thank you for starting this discussion.
>
> To share my context: I am primarily using DAMON_RECLAIM on my personal
> laptop. During my usage, I found that using the free memory rate
> (MemFree) as the default watermark metric is highly problematic for
> modern Linux environments, because the kernel aggressively uses free
> memory for page cache.
Thank you for sharing your use case!
> Therefore, I compiled a custom kernel that
> supports monitoring the available memory rate (MemAvailable). Since I
> understand that the current watermark mechanism is not planned for
> long-term extension, I refrained from proposing improvements to it, and
> instead focused on understanding why that direction is limited.
>
> I am very interested in understanding the design constraints behind
> deprecating watermarks. From my current perspective, watermarks have
> these drawbacks as a run/stop mechanism:
>
> - Mismatch between local monitoring and global triggers: When monitoring
> a specific target (e.g., via VADDR), the scheme's run/stop decision is
> currently tied to global system watermarks. It is impossible to
> determine whether to run/stop the scheme based solely on that specific
> target's memory usage. Therefore, the new mechanism might need to
> allow user-space to pause/resume schemes based on custom, target-aware
> metrics.
>
> - Lack of diverse metrics: Watermarks currently lack support for metrics
> like PSI or inactive/active memory ratio, even though such metrics
> might be better suited for DAMOS auto-tuning goals.
>
> However, I realize these features could probably be achieved by simply
> improving the current watermarks. Most of the drawbacks I can think of
> are basically about "not enough metrics/customizability".
>
> I assume there is a deeper architectural reason why you consider this
> direction unsuitable for long-term evolution. If you could share a bit
> about those constraints, I would be able to think about the new
> mechanism in the right direction, rather than approaching it from my own
> assumptions.
>
> My need for a more accurate trigger metric (like MemAvailable) and
> always-on monitoring is exactly why I want to help build the new
> mechanism. I prefer to invest my time in the future architecture rather
> than adding features to a mechanism that is about to be deprecated.
>
> If you are open to this, I would be happy to start by reviewing the
> design direction you have in mind, and then help with implementation or
> testing where it is feasible for me to contribute meaningfully.
I think watermarks is bettert to be deprecated due to following reasons. First
of all, it stops monitoring. It means the converged region age and addresses
information is lost. This is the biggest problem. Secondly, we already have
similar and better features including DAMOS quotas. For your DAMON_RECLAIM use
case, I'd suggest using it without watermarks but quota_mem_pressure_us.
Hence I want to deprecate watermarks rather than improving it. If we need a
better watermarks, I think we should improve/extend alternatives like DAMOS
quotas, or implement a new one. But, we should first understand why we need a
better watermarks. You mentioned you want to use DAMOS watermarks with
DAMON_RECLAIM on your laptop. Could you further share why you want to use
watermarks, and what was the problem? You mentioned it was problematic due to
page cache, and you implemented memAvailable based watermarks. Why you use
wateramrks? How exactly the page cache usage becomes a problem for you? Has
the memAvaialble based one solved your problem?
>
> [1] https://lore.kernel.org/damon/20260808000739.1308-1-sj@kernel.org
Thanks,
SJ
[...]
prev parent reply other threads:[~2026-08-14 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 8:47 [RFC/Discussion] mm/damon: Helping with alternative for watermarks Liew Rui Yan
2026-08-14 14:54 ` SJ 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=20260814145414.91204-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=aethernet65535@gmail.com \
--cc=damon@lists.linux.dev \
--cc=gutierrez.asier@huawei-partners.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.