Re: [PATCH 4/5] selftests/damon/damos_tried_regions: handle empty tried regions in early cycles
From: SeongJae Park
Date: Sun May 31 2026 - 12:54:54 EST
On Sun, 31 May 2026 17:17:23 +0800 Kunwu Chan <kunwu.chan@xxxxxxxxx> wrote:
> From: Kunwu Chan <kunwu.chan@xxxxxxxxx>
>
> The test aborts if the initial aggregation cycles produce zero
> tried regions. This can happen on slow machines, causing false
> failures. Skip empty cycles and retry up to 200 times before
> giving up. Also check that enough samples were collected before
> computing the 50th percentile.
I agree this will make the test be more reliable. I'm bit concerned if 200
times retry can make the test run too long, though.
Also, could you further elaborate why this can fail on slow machines? That is,
DAMON will check the access of 'access_memory_even' process every 5ms. Are you
thinking the 5ms is too short for 'access_memory_event' to make the expected
access (accessing the 7 regins of 10 MiB size) within? If so, should we
increase the sampling interval before retrying?
I also suspect if the unreliable results you seen is due to the fact that DAMON
is not flushing TLB, like we discussed before. If that's the case, could we
increase the working set size of this test, similar to the wss_estimation test?
[1] https://lore.kernel.org/20260525144846.604907-1-kunwu.chan@xxxxxxxxx
Thanks,
SJ
[...]