[pr-docs][memory] resource: the first-upload allowance's doc says what its 80% ceiling is weighed against #416
Loading…
Reference in a new issue
No description provided.
Delete branch "iboom72/docs/first-upload-ceiling-doc"
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?
What it changes
DARNER_TEXTURE_ROOM_PERCENT=80): "first host textures admitted just over the room line in the last 5 seconds: 13880 … 13880 allowed, 0 refused" while the room line said "no room, new textures wait" (9,084 MB weighed against 8,721 MB).The doc of
room_for_first_upload(crates/darner-gpu/src/resource.rs:3476) calls the allowance "small, hard-capped" and says "It never crosses 80% of the card's budget".first_upload_decisionweighs that ceiling against the bytes in host copies of textures only; its comment at:3595records why that was changed on purpose. So the card as a whole can pass the room line and 80% through first uploads, until the whole-card guard stops them. The doc now says that. Comment only.A question this leaves for the maintainer, not answered here: with
DARNER_TEXTURE_ROOM_PERCENT=80the ceiling (line + 128 MB, at most 80%) equals the line, soDARNER_TEXTURE_FIRST_UPLOAD_MBchanges nothing. Is that meant?How it was tested
6901f0e2cargo clippy -p darner-gpu --all-targets --locked -- -D warnings: clean.cargo test -p darner-gpu --lib --locked first_upload: 10 passed, 0 failed.darner-gpuwith all targets, and the unit tests named above. Not run: clippy over the whole workspace, clippy with--all-features,cargo test --workspace.Checklist
main.docs/asset-policy.md.Checked for overlap
resource.rselsewhere (no hunk within 30 lines).first_uploadorFIRST_UPLOAD. The forge's search forroom_for_first_uploadfinds no PR and one open issue whose text does not contain the name; "first upload" as words returns many reports that quote the log line, none about the doc.🤖 Generated with Claude Code
The distinction here is zero versus a positive allowance. When the effective room line is already at or above 80% of the budget, every positive allowance uses the same 80% ceiling. A value of zero still disables this fallback when the ordinary room check refuses the upload.
The two checks also count different bytes. Ordinary room can be exhausted by total card use, while the first upload can still fit below the ceiling on title texture copies. The separate whole-card check still applies. That explains how the quoted log can show first uploads allowed alongside an ordinary room refusal.
Thanks, that is right, and my sentence was too wide. With
DARNER_TEXTURE_ROOM_PERCENT=80every positive value ofDARNER_TEXTURE_FIRST_UPLOAD_MBgives the same ceiling, but0still turns the allowance off (first_upload_decisionreturnsAllowanceOff). So the size stops mattering there and the on/off does not, which answers the question in the description. The doc comment in the diff does not make that claim and stays as it is.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.