Repository navigation
machine: the pressure lane drops its disk from the cache before memlimit - #432
Merged
Merged
Conversation
task boot:pressure failed its memlimit phase on a laptop: no Limited of memory.high, and memory.high's reclaims did not move (#429). The test writes the 256 MiB second disk itself, so whatever of it the host still caches is charged to the test's cgroup. QEMU's reads of cached pages charge nothing to QEMU's cgroup, so the memory.high set 32 MiB above QEMU's memory.current was never reached. Whether the lane passed depended on how much of the disk the host had evicted by then. Measured with QEMU's memory.stat and memory.events and the disk's residency (mincore) at each phase, the test's own reads keeping the whole disk cached as an idle host does: at memlimit's start 256 MiB of the disk was resident, QEMU's file stayed at 17 MB through the phase while the guest read 41 GB of the disk, memory.events' high stayed 0, and the lane failed with both of the issue's messages. With the disk dropped from the cache as the phase starts, the same setup brought 33928 high events and QEMU's file grew to 50 MB. iolimit already dropped the disk for io.max's sake; both phases now share it. task boot:pressure passes (v20261121.01, laptop). Closes #429 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Before the next release the gates have to be trustworthy: a lane that fails on main teaches people to re-run instead of read.
task boot:pressurefailed itsmemlimitphase on a laptop with "phase memlimit brought no Limited of memory.high" and "memory.high's reclaims did not move" (#429).Cause
The test writes the 256 MiB second disk (
lim) itself, so what of it the host still caches is charged to the test's cgroup, not QEMU's. QEMU's reads of cached pages charge nothing to QEMU's cgroup, so thememory.highset 32 MiB above QEMU'smemory.currentis never reached. Whether the lane passed depended on how much of the disk the host had evicted beforememlimit. On a loaded host it was gone by then. On an idle one it stayed.Evidence. The lane was run with temporary logging of QEMU's
memory.current,memory.statfileandmemory.eventsand of the disk's residency (mincore) at every phase. The test read the disk once beforecpulimit, as an idle host keeps it cached after the write.filethrough memlimitmemory.eventshighChange
memlimitdrops the disk from the host's cache (FADV_DONTNEED) before it setsmemory.high, asiolimitalready did forio.max. Both phases share oneuncachehelper.Verified.
task boot:pressurepasses on the laptop (KVM, release v20261121.01).go tool task lint test mutatepasses (coverage 80.5%, mutate has no non-test Go file to break).Closes #429
🤖 Generated with Claude Code