Account for bounce and intermediate buffers in the storage staging gate #276
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!276
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-276"
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?
@yyc160 on GitHub · 2026-12-05 22:27 UTC · original
yyc160:fix/account-dstorage-staging→main· +33 −15 · 1 files · 1 commits · merged 2026-12-05 22:51 UTCPlain file requests already allocate a bounce buffer to avoid kernel writes into guarded title pages, but the scheduler charged them zero staging bytes. Zlib followed by BCPack can also hold the intermediate buffer alongside the source. A burst of such requests could exceed the intended scratch-memory allowance while the scheduler believed it still had room.
Account for these input buffers with 64-bit sizes. Keep memory-to-memory plain copies staging-free and preserve the existing lone-oversized-request rule. Read the plain file before opening its destination for the user-mode copy; a failed file read has not changed any destination bytes. A refused destination still fails before I/O.
Tested the storage module against upstream with a new gate-accounting regression test for file and memory sources. This bounds the charged allocations, not the whole decoder's memory. No claim about game frame-rate improvements.
AI-assisted by GPT-6.2 Astra.