All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liew Rui Yan <aethernet65535@gmail.com>
To: sj@kernel.org
Cc: aethernet65535@gmail.com, damon@lists.linux.dev,
	gutierrez.asier@huawei-partners.com, linux-mm@kvack.org
Subject: Re: [RFC/Discussion] mm/damon: Helping with alternative for watermarks
Date: Mon, 17 Aug 2026 16:39:23 +0800	[thread overview]
Message-ID: <20260817083923.4374-1-aethernet65535@gmail.com> (raw)
In-Reply-To: <20260814145414.91204-1-sj@kernel.org>

On Fri, 14 Aug 2026 07:54:13 -0700 SJ Park <sj@kernel.org> wrote:

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

While quota_mem_pressure_us may not be suitable for my use case, I
realize that DAMOS Quota does meet my needs - only proactively reclaims
memory when 'MemAvaialble <= 30%'.  I used it on my machine by
implementing DAMOS_QUOTA_AVAILABLE_MEM_BP, which can also be achieved
through the user_input of DAMOS Quota.

I think DAMOS Quota is indeed similar to and better than Watermarks.
The main drawback of DAMOS Quota at present is probably the lack of
wmarks.low like Watermarks, but this can be solved by adding a parameter,
which might be called fallback_value or some other better name.

Therefore, I agree that we should improve DAMOS Quota instead of
Watermarks, as it is indeed much better than Watermarks.

> 
> 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. Why use Watermarks? And what was the problem?

I now understand why we do not need better Watermarks, so my answer is
based on my previous thought.

I used Watermarks primarily because it is the only mechanism I know for
stopping/running a Scheme.  The problem is it can only monitor MemFree.

2. How exactly the page cache becomes a problem for you?

After prolonged computer use, the page cache can become full.
DAMON_RECLAIM might then mistakenly assume there is slight memory
pressure and reclaim those cached pages.  Unnecessary page cache
reclamation can incur unnecessary overhead.

3. Has the MemAvailable based one solved your problem?

Yes, using MemAvailable as a watermarks/DAMOS Quota metric can avoid a
lot of unnecessary memory reclamation.

Best regards,
Rui Yan


  reply	other threads:[~2026-08-17  8:39 UTC|newest]

Thread overview: 4+ 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
2026-08-17  8:39   ` Liew Rui Yan [this message]
2026-08-17 13:57     ` SJ 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=20260817083923.4374-1-aethernet65535@gmail.com \
    --to=aethernet65535@gmail.com \
    --cc=damon@lists.linux.dev \
    --cc=gutierrez.asier@huawei-partners.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 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.