Re: [PATCH v2.1] mm/damon/core: fix false positive in damos_quota_is_full() when esz is zero
From: Liew Rui Yan
Date: Wed Sep 02 2026 - 10:34:41 EST
On Wed, 02 Sep 2026 07:10:00 -0700 SJ Park <sj@xxxxxxxxxx> wrote:
> On Wed, 2 Sep 2026 16:44:45 +0800 Liew Rui Yan <aethernet65535@xxxxxxxxx> wrote:
>
> > When setting goal_tuner to 'temporal', if the goal is achieved,
> > quota->esz_bp will be set to zero. In this case, damos_quota_is_full()
> > will always return true, even if no regions have been tried to apply at
> > all. This causes qt_exceeds to increase unexpectedly.
>
> To me, this looks logically correct. Could this cause any user issue?
Yes, I think this might cause unnecessary confusion for users, at least
it did for me.
I set quota_ms to 0 and set the target_metric for the quota goal to
user_input (i.e., MemAvailable). In my use case, this caused
esz_bp to be 0 most of the time. Also, because the quota->ms clamp
was missing, esz wasn’t set to min_region_sz, it was actually set to
0.
As a result, nr_tried is 0 (because damos_quota_is_full() in
damon_do_apply_scheme() always returns true), but qt_exceeds
increments once per second (likely because reset_interval_ms defaults
to 1000ms / 1s).
Best regards,
Rui Yan