Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Zenghui Yu <zenghui.yu@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alistair Popple <apopple@nvidia.com>,
	linux-mm@kvack.org, jgg@ziepe.ca, leon@kernel.org,
	david@kernel.org, liam@infradead.org, vbabka@kernel.org,
	rppt@kernel.org, mhocko@suse.com, balbirs@nvidia.com
Subject: Re: [PATCH] selftests/mm: hmm: give migrate_remap_fault a longer timeout
Date: Wed, 25 Nov 2026 17:22:57 +0800	[thread overview]
Message-ID: <7295e3f7-1798-46ad-8213-bc426be790eb@linux.dev> (raw)
In-Reply-To: <20261124213730.a8b4f5100785a2cde54fa8b4@linux-foundation.org>

Hi Andrew,

On 11/25/26 1:37 PM, Andrew Morton wrote:
> On Fri, 20 Nov 2026 09:31:23 +1100 Alistair Popple <apopple@nvidia.com> wrote:
> 
> > On 2026-11-20 at 00:39 +1100, Zenghui Yu <zenghui.yu@linux.dev> wrote...
> > > From: "Zenghui Yu (Huawei)" <zenghui.yu@linux.dev>
> > >
> > > migrate_remap_fault sizes its working set from the PMD page size and runs
> > > 24 combinations of migration/mremap parameters.  On arm64 with 64K base
> > > pages the PMD size is 512MB, so the test churns through tens of gigabytes
> > > of memory and takes ~32 seconds on my test machine.  This just exceeds the
> > > kselftest harness's 30s default per-test timeout (TEST_TIMEOUT_DEFAULT),
> > > and the test gets killed with "Test terminated by timeout" even though it
> > > is making steady progress.
> > >
> > > Raise the timeout to 120 seconds via TEST_F_TIMEOUT, so that the test can
> > > run to completion on configurations with large PMD sizes.
> >
> > I guess the alternative is to reduce the number of test combinations, but that
> > seems like it would reduce coverage so this seems reasonable. Adding Balbir to
> > CC in case he has thoughts though.
> 
> 32 seconds is just too long.  We have ~1200 seltests!  Imagine if they
> all did that.
> 
> Can we figure out how to make this test a lot faster?  I slop-coded a
> thing (below) which halves the runtime but it still needs to be taught
> to do at least one full-PMD MADV_NOHUGEPAGE run on systems with a PMD
> larger than 2 MiB.  And 15 seconds still sucks.
> 
> See, if running all selftest takes multiple hours then lots of people
> just aren't going to run selftests and that harms our overall project. 
> They need to be snappy.

The good news is that it is perfect on the popular 4k-page-size (and 16k)
systems, and 64k has not been tested much yet ;-)  There are still some
failures on my 64k machines that need to be addressed.  I just haven't had
a chance to fix them.

> 
> If we can't do this then I suggest we find a general way of excluding
> exceptionally slow tests from run_tests unless the user explicitly
> passes some --i-am-very-patient arg.  But that's out of scope for this
> present timeout issue.
> 
> Zenghui, are you able to figure out some way of speeding up hmm-tests.c
> to avoid the timeout without compromising test coverage too much?

Since Balbir volunteers to deal with it, I will test it then.

Thanks both,
Zenghui


      parent reply	other threads:[~2026-11-25  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 13:39 [PATCH] selftests/mm: hmm: give migrate_remap_fault a longer timeout Zenghui Yu
2026-11-19 13:54 ` Zenghui Yu
2026-11-19 22:31 ` Alistair Popple
2026-11-25  5:37   ` Andrew Morton
2026-11-25  5:50     ` Balbir Singh
2026-11-25  5:57       ` Andrew Morton
2026-11-25  9:22     ` Zenghui Yu [this message]

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=7295e3f7-1798-46ad-8213-bc426be790eb@linux.dev \
    --to=zenghui.yu@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=apopple@nvidia.com \
    --cc=balbirs@nvidia.com \
    --cc=david@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=rppt@kernel.org \
    --cc=vbabka@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