All of lore.kernel.org
 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, 20 Oct 2026 06:58:21 -0700	[thread overview]
Message-ID: <20261020135822.85334-1-sj@kernel.org> (raw)
In-Reply-To: <20261020133233.3920818-1-ruanjinjie@huawei.com>

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
document to clearly explain the usage?  Also, have you considered using DAMON
sysfs interface instead of DAMON_RECLAIM?


Thanks,
SJ

[...]

  reply	other threads:[~2026-10-20 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20 13:32 [RFC PATCH] mm/damon/reclaim: allow disabling watermarks to force reclaim of cold pages Jinjie Ruan
2026-10-20 13:58 ` SJ Park [this message]
2026-10-20 16:07   ` Aveline Noir
2026-10-20 14:00 ` sashiko-bot

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