Re: [RFC PATCH] mm/damon/reclaim: allow disabling watermarks to force reclaim of cold pages
From: SJ Park
Date: Tue Oct 27 2026 - 10:02:11 EST
On Tue, 27 Oct 2026 17:46:11 +0800 Jinjie Ruan <ruanjinjie@xxxxxxxxxx> wrote:
>
>
> 在 2026/10/20 21:58, SJ Park 写道:
> > Hello Jinjie,
> >
> > On Tue, 20 Oct 2026 21:32:33 +0800 Jinjie Ruan <ruanjinjie@xxxxxxxxxx> 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
[...]