Re: [RFC PATCH] mm/damon/reclaim: allow disabling watermarks to force reclaim of cold pages
From: SJ Park
Date: Tue Oct 20 2026 - 09:59:44 EST
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
document to clearly explain the usage? Also, have you considered using DAMON
sysfs interface instead of DAMON_RECLAIM?
Thanks,
SJ
[...]