summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2022-01-14 14:10:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-15 16:30:33 +0200
commit6268eac34ca30af7f6313504d556ec7fcd295621 (patch)
tree72c90a1ea6f1e7ea3f39a7bacc0e4bb64d4c2411 /mm
parent0e92c2ee9f459542c5384d9cfab24873c3dd6398 (diff)
mm/damon/schemes: account how many times quota limit has exceeded
If the time/space quotas of a given DAMON-based operation scheme is too small, the scheme could show unexpectedly slow progress. However, there is no good way to notice the case in runtime. This commit extends the DAMOS stat to provide how many times the quota limits exceeded so that the users can easily notice the case and tune the scheme. Link: https://lkml.kernel.org/r/20211210150016.35349-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/damon/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c
index d745bf28509f..d5120b326e1b 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -693,6 +693,8 @@ static void kdamond_apply_schemes(struct damon_ctx *c)
if (time_after_eq(jiffies, quota->charged_from +
msecs_to_jiffies(
quota->reset_interval))) {
+ if (quota->esz && quota->charged_sz >= quota->esz)
+ s->stat.qt_exceeds++;
quota->total_charged_sz += quota->charged_sz;
quota->charged_from = jiffies;
quota->charged_sz = 0;