Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kunwu Chan" <kunwu.chan@linux.dev>
To: "SeongJae Park" <sj@kernel.org>
Cc: "SeongJae Park" <sj@kernel.org>,
	shuah@kernel.org, damon@lists.linux.dev,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, "Kunwu Chan" <kunwu.chan@gmail.com>,
	"Wang Lian" <lianux.mm@gmail.com>,
	"Kunwu Chan" <chentao@kylinos.cn>
Subject: Re: [PATCH 4/5] selftests/damon/damos_tried_regions: handle empty tried regions in early cycles
Date: Mon, 01 Jun 2026 02:33:50 +0000	[thread overview]
Message-ID: <4915dbdd42711403f1781e3c7a71a11a53b0249d@linux.dev> (raw)
In-Reply-To: <20260531165437.99410-1-sj@kernel.org>

June 1, 2026 at 12:54 AM, "SeongJae Park" <sj@kernel.org mailto:sj@kernel.org?to=%22SeongJae%20Park%22%20%3Csj%40kernel.org%3E > wrote:


> 
> On Sun, 31 May 2026 17:17:23 +0800 Kunwu Chan <kunwu.chan@linux.dev> wrote:
> 
> > 
> > From: Kunwu Chan <kunwu.chan@gmail.com>
> >  
> >  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?
> 
Thanks, SJ.

Good points.

I don't yet have enough evidence to say whether this is primarily due to
scheduling delays, a too-short sampling interval, or effects from not
flushing TLB.

I'll investigate the root cause and see if increasing the working set
size or adjusting the test configuration may be a cleaner solution than
adding retries.

I'll drop this patch from v2 for now and revisit it once I better
understand the root cause.

Thanks,
Kunwu

> [1] https://lore.kernel.org/20260525144846.604907-1-kunwu.chan@linux.dev
> 
> Thanks,
> SJ
> 
> [...]
>


  reply	other threads:[~2026-06-01  2:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31  8:56 [PATCH 0/5] selftests/damon: misc fixes for test bugs Kunwu Chan
2026-05-31  9:17 ` [PATCH 1/5] selftests/damon: prevent cross-context state pollution in DamonCtx Kunwu Chan
2026-05-31  9:17   ` [PATCH 2/5] selftests/damon: fix memcg filter path handling Kunwu Chan
2026-05-31 16:36     ` SeongJae Park
2026-06-01  2:19       ` Kunwu Chan
2026-05-31  9:17   ` [PATCH 3/5] selftests/damon/damos_tried_regions: fix expectation output and join TypeError Kunwu Chan
2026-05-31 16:39     ` SeongJae Park
2026-05-31  9:17   ` [PATCH 4/5] selftests/damon/damos_tried_regions: handle empty tried regions in early cycles Kunwu Chan
2026-05-31 16:54     ` SeongJae Park
2026-06-01  2:33       ` Kunwu Chan [this message]
2026-05-31  9:17   ` [PATCH 5/5] selftests/damon: fix dead code, skipped checks, and broken lookups Kunwu Chan
2026-05-31 16:59     ` SeongJae Park
2026-05-31 16:30   ` [PATCH 1/5] selftests/damon: prevent cross-context state pollution in DamonCtx SeongJae Park
2026-06-01  2:11     ` Kunwu Chan
2026-05-31 17:08 ` [PATCH 0/5] selftests/damon: misc fixes for test bugs SeongJae Park
2026-06-01  2:38   ` Kunwu Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4915dbdd42711403f1781e3c7a71a11a53b0249d@linux.dev \
    --to=kunwu.chan@linux.dev \
    --cc=chentao@kylinos.cn \
    --cc=damon@lists.linux.dev \
    --cc=kunwu.chan@gmail.com \
    --cc=lianux.mm@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    --cc=sj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox