mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #1316] tests: xmem commit-on-touch checks read the test's own view, not system commit (TEST-XMEM-COMMIT-CHECK) #1347
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1347
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1316
Author: @GuilhermeG5
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:pr/xmem-commit-check📝 Commits (1)
e668886tests: xmem commit-on-touch checks read the test's own view, not system commit📊 Changes
1 file changed (+22 additions, -6 deletions)
View changed files
📝
runtime/test/xmem_test.cpp(+22 -6)📄 Description
Requested by Guilherme Correa · project thread
Claimed in the coordination issue as: TEST-XMEM-COMMIT-CHECK
What and why
xmem_testfailed intermittently in full CTest runs (about once in a dozen on our machine). The two checks intest_physical_pages_commit_on_touchthat decide whether mapping or touching physical pages charges commit comparedGetPerformanceInfo().CommitTotalbefore and after. CommitTotal is system-wide: any other process that commits orfrees memory in between moves it. With
ctest -R ^xmem$ --repeat until-fail:500while a build ran, the check failedon run 20, and with the values printed, on run 55 with -120 MiB where +32 MiB (512 x 64 KiB) was expected. It was
never the shim: when the machine was quiet the growth was 32.6-39.7 MiB.
The checks now count the committed (
MEM_COMMIT) 64 KiB pages of the test's own view withVirtualQuery, which isthe state
commit_mapped_pageitself reads: 0 after mapping, exactly the 512 touched pages after writing. Thesystem-wide growth is still printed, as information only. "Allocating those pages does not charge them" keeps
CommitTotal: there is no view to query yet, and its bound (1/8 of the allocation) was not hit.
Overlaps: #417 changes the same check differently (it re-measures CommitTotal on two more page windows when the first
measurement misses). This PR stops depending on the system-wide counter instead. Whichever lands first, I will rebase
the other side's leftovers; I am also happy to fold this into #417 if its author prefers.
Tested
ctest -R ^xmem$ --repeat until-fail:500under a concurrent full build: 500/500 (before: failures at runs 20 and55); the printed system-wide growth ranged from -236 MiB to +313 MiB meanwhile.
abc0bd884+ this commit):xmempasses;--repeat until-fail:100: 100/100.6293c1c4fwith this and other local changes: 315 registered, 302 passed, 11 skipped, 1 disabled,1 failed (
d3d12_execute_indirect_validation, which fails the same way on unmodified main on this machine).GPUs tested: NVIDIA GeForce RTX 2060 SUPER, driver 621.01, Windows 11 10.0.26300 (the test is CPU-only)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.