]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/damon/core: allow quota goals set zero effective size quota
authorSeongJae Park <sj@kernel.org>
Tue, 10 Mar 2026 01:05:18 +0000 (18:05 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:25 +0000 (13:53 -0700)
commit54419bbd0ee3c7fb7f3c1e3e117f0b8d15d7a896
treed4621365d1aeb4c8c6965f5a6ce1204d391dcb93
parent8719c59c4b928fc9ad8d8f45ecbdf859660c904c
mm/damon/core: allow quota goals set zero effective size quota

User-explicit quotas (size and time quotas) having zero value means the
quotas are unset.  And, effective size quota is set as the minimum value
of the explicit quotas.  When quota goals are set, the goal-based quota
tuner can make it lower.  But the existing only single tuner never sets
the effective size quota zero.  Because of the fact, DAMON core assumes
zero effective quota means the user has set no quota.

Multiple tuners are now allowed, though.  In the future, some tuners might
want to set a zero effective size quota.  There is no reason to restrict
that.  Meanwhile, because of the current implementation, it will only
deactivate all quotas and make the scheme work at its full speed.

Introduce a dedicated function for checking if no quota is set.  The
function checks the fact by showing if the user-set explicit quotas are
zero and no goal is installed.  It is decoupled from zero effective quota,
and hence allows future tuners set zero effective quota for intentionally
deactivating the scheme by a purpose.

Link: https://lkml.kernel.org/r/20260310010529.91162-3-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c