mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SJ Park <sj@kernel.org>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: SJ Park <sj@kernel.org>,
	akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	liam@infradead.org, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, corbet@lwn.net,
	skhan@linuxfoundation.org, rdunlap@infradead.org,
	damon@lists.linux.dev, linux-mm@kvack.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] mm/damon/reclaim: allow disabling watermarks to force reclaim of cold pages
Date: Tue, 27 Oct 2026 06:57:45 -0700	[thread overview]
Message-ID: <20261027135746.150166-1-sj@kernel.org> (raw)
In-Reply-To: <6e381f14-f00b-4c0d-8499-f5a5f37b2572@huawei.com>

On Tue, 27 Oct 2026 17:46:11 +0800 Jinjie Ruan <ruanjinjie@huawei.com> wrote:

> 
> 
> 在 2026/10/20 21:58, SJ Park 写道:
> > Hello Jinjie,
> > 
> > On Tue, 20 Oct 2026 21:32:33 +0800 Jinjie Ruan <ruanjinjie@huawei.com> wrote:
> > 
> >> DAMON_RECLAIM runs its scheme only while the free memory rate is in
> >> [wmarks_low, wmarks_mid].  Reclaiming cold pages raises the rate, so the
> >> scheme self-stops as soon as memory looks plentiful again, which is wrong
> >> for a VMM parking an idle sandbox that wants cold anonymous pages
> >> reclaimed immediately.
> >>
> >> So add an ignore_wmarks module parameter. When set, the scheme uses
> >> DAMOS_WMARK_NONE, so damos_wmark_wait_us() always returns zero and the
> >> scheme stays active, bounded only by min_age and the quota.
> > 
> > I agree there could be use cases that doesn't want the watermarks at all.  I'd
> > like to avoid adding new DAMON_RECLAIM parameters if possible, though.  That's
> > becasuse DAMON_RECLAIM is introduced to let people use it without complicated
> > setups.  We will of course add new parameters if really needed, but I want to
> > see if there is a good alternative.
> > 
> > Have you considered some other alternatives?  For example, could respectively
> > setting wmarks_high, wmarks_mid and wmarks_low to 100%, 100% and 0% effectively
> > disable watermarks?  Have you tried that?  If that works, how about updating
> 
> Hi SJ,
> 
> Yes, it does for my use case.

Thank you for confirming.

> 
> > document to clearly explain the usage?  Also, have you considered using DAMON
> 
> Thank you! I will send a patch to update the doc later.

Looking forward to your patch!

> 
> > sysfs interface instead of DAMON_RECLAIM?
> 
> DAMON sysfs can also do this with "none" watermarks. But I want the
> simple DAMON_RECLAIM for only proactive reclam.

Thank you for clarifying, that makes sense to me.


Thanks,
SJ

[...]

      reply	other threads:[~2026-10-27 13:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 13:32 Jinjie Ruan
2026-10-20 13:58 ` SJ Park
2026-10-20 16:07   ` Aveline Noir
2026-10-27  9:46   ` Jinjie Ruan
2026-10-27 13:57     ` 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=20261027135746.150166-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=damon@lists.linux.dev \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rdunlap@infradead.org \
    --cc=rppt@kernel.org \
    --cc=ruanjinjie@huawei.com \
    --cc=skhan@linuxfoundation.org \
    --cc=surenb@google.com \
    --cc=vbabka@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®