OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
* [Devel] [PATCH vz10 v2 1/2] ms/selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms
@ 2026-08-31 23:13 Eva Kurchatova
  2026-08-31 23:13 ` [Devel] [PATCH vz10 v2 2/2] ms/selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries Eva Kurchatova
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eva Kurchatova @ 2026-08-31 23:13 UTC (permalink / raw)
  To: khorenko; +Cc: devel

From: SeongJae Park <sj@kernel.org>

damon_nr_regions.py updates max_nr_regions to a number smaller than
expected number of real regions and confirms DAMON respect the harsh
limit.  To give time for DAMON to make changes for the regions, 3
aggregation intervals (300 milliseconds) are given.

The internal mechanism works with not only the max_nr_regions, but also
sz_limit, though.  It avoids merging region if that casn make region of
size larger than sz_limit.  In the test, sz_limit is set too small to
achive the new max_nr_regions, unless it is updated for the new
min_nr_regions.  But the update is done only once per operations set
update interval, which is one second by default.

Hence, the test randomly incurs false positive failures.  Fix it by
setting the ops interval same to aggregation interval, to make sure
sz_limit is updated by the time of the check.

Link: https://lkml.kernel.org/r/20250225222333.505646-3-sj@kernel.org
Fixes: 8bf890c81612 ("selftests/damon/damon_nr_regions: test online-tuned max_nr_regions")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 695469c07a65547acb6e229b3fdf6aaa881817e3)

https://virtuozzo.atlassian.net/browse/VSTOR-132453
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 tools/testing/selftests/damon/damon_nr_regions.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/damon/damon_nr_regions.py b/tools/testing/selftests/damon/damon_nr_regions.py
index ddd258da6946..2ed12281cea2 100755
--- a/tools/testing/selftests/damon/damon_nr_regions.py
+++ b/tools/testing/selftests/damon/damon_nr_regions.py
@@ -113,6 +113,7 @@ def main():
     attrs = kdamonds.kdamonds[0].contexts[0].monitoring_attrs
     attrs.min_nr_regions = 3
     attrs.max_nr_regions = 7
+    attrs.update_us = 100000
     err = kdamonds.kdamonds[0].commit()
     if err is not None:
         proc.terminate()
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-09-02 18:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 23:13 [Devel] [PATCH vz10 v2 1/2] ms/selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms Eva Kurchatova
2026-08-31 23:13 ` [Devel] [PATCH vz10 v2 2/2] ms/selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries Eva Kurchatova
2026-09-02 17:56   ` Konstantin Khorenko
2026-09-02 17:56 ` [Devel] [PATCH vz10 v2 1/2] ms/selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms Konstantin Khorenko
2026-09-02 17:59 ` Konstantin Khorenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox