selftests/mm: hmm: give migrate_remap_fault a longer timeout
PATCH 1/1 selftests/mm: hmm: give migrate_remap_fault a longer timeout
From: "Zenghui Yu (Huawei)" <[email protected]>
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.
--- tools/testing/selftests/mm/hmm-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/mm/hmm-tests.c +1 -1
@@ -2221,7 +2221,7 @@ TEST_F(hmm, migrate_partial_unmap_fault) } } -TEST_F(hmm, migrate_remap_fault) +TEST_F_TIMEOUT(hmm, migrate_remap_fault, 120) {struct hmm_buffer *buffer;unsigned long npages;
Signature · 1 line
2.56.0
Quoted 9 lines · Zenghui Yu
From: "Zenghui Yu (Huawei)" <[email protected]>
migrate_remap_faultsizes 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.
This (and any) failure of the hmm-tests binary is silently reported as PASS by the kselftest framework because test_hmm.sh always exits with 0, which needs to be fixed separately.
Thanks,
Zenghui
On 2026-11-20 at 00:39 +1100, Zenghui Yu <[email protected]> wrote...
Quoted 10 lines
From: "Zenghui Yu (Huawei)" <[email protected]>
migrate_remap_faultsizes 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.
Quoted 2 lines
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.
Quoted 22 lines
Signed-off-by Zenghui Yu (Huawei) <[email protected]>--- tools/testing/selftests/mm/hmm-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/mm/hmm-tests.c +1
-1@@ -2221,7 +2221,7 @@ TEST_F(hmm, migrate_partial_unmap_fault) } } -TEST_F(hmm, migrate_remap_fault) +TEST_F_TIMEOUT(hmm, migrate_remap_fault, 120) {struct hmm_buffer *buffer;unsigned long npages;Signature · 1 line
2.56.0