WIP: Preload: a full warm drops stale marks from warm-done.txt (DARNER_PRELOAD_KEEP_MARKS) #470
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!470
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:up-keep-marks-compact"
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?
Refs #264
What it changes
Follow-up to #264 (merged at
f55e9b58). It answers point 1 of the review: #264 (comment)DARNER_PRELOAD_KEEP_MARKS=1,warm-done.txtis kept across a translator change, so the file only grows. Each translator change adds the new names (about 22k, ~1 MB on the PC that gave the numbers in the review) and nothing removes the old ones. This is read from the code and from the review; I did not measure a grown file.apps/darner/src/warm.rs): when a warm over every known pipeline ends (not--used, not--limit, andDARNER_PRELOAD_KEEP_MARKS=1), it rewriteswarm-done.txtwithout this build's marks (the current fingerprint) whose name no pipeline has any more, and without repeated lines. Lines of other fingerprints (another program path, card or driver) and lines of no known shape are kept. It writes a file beside it (warm-done.txt.new) and renames it over the old one. It printswarm-done.txt: N marks of names no pipeline has any more were dropped, orwas not compacted: <error>and goes on.--usedand--limitruns name only some pipelines, so they never compact.KEEP_MARKSinplay.rsbecomespub(crate)sowarm.rsreads the same name. README row anddocs/findings.mdsay it.How it was tested
up-keep-marks-compact@e8f517e2a, based on main47d21cd3b.47d21cd3b. main is nowd91d8e4d6;git merge-treemerges the branch cleanly there. Not rebased, not re-tested on the new main (WIP).cargo clippy -p darner, with and without--all-features, and thedarnertests forwarm, including two new ones (compacting_the_done_marks_keeps_only_current_names_of_this_fingerprint,compacting_the_done_file_rewrites_it_only_when_a_line_goes), reported clean by the porter; exact flags and counts not kept. I did not re-run them for this text.--all-features) andcargo test --workspace --locked.WIP:comes off:darner preloadwith the switch on after a translator change: the printed line shows the dropped count, and a second start finds the marks it needs.darner preload --usedleaveswarm-done.txtas it was.Spec dependence
Checklist
main.docs/asset-policy.md. (Text only; policy not recorded as run for this branch.)Checked for overlap
apps/darner/src/warm.rs. #450 has a hunk at about line 828 (inmake, next tomod tests), right where our new tests go (about line 830), so a textual conflict is possible there. #463 changes one test fixture about 55 lines further down; #458 editsrunandinto_libraryfar from our hunks. #270 has one hunk (about line 377) a few lines above ourrunhunk (about 388).apps/darner/src/play.rsbut notKEEP_MARKS; #429, #431 and #435 also listplay.rs. Our change there is one line.warm-done.txt).This change was made with AI assistance (Claude Code).
Tested
e8f517e2a5282bf2e6bfe504de1bef16e3057cc6on Windows 11 build 26300, NTFS, RTX 3060 Laptop GPU (621.24).darner warm --jobs 1withDARNER_PRELOAD_KEEP_MARKS=1in a fresh cache. A small compute pipeline generated from the project's test helpers was named and created on the GPU. After adding one stale mark with the active fingerprint and one mark with a different fingerprint, the second warm reused the existing pipeline, built zero, and dropped exactly one line. The valid and foreign marks survived byte-for-byte. A third warm left the journal hash unchanged.--limit 1and--usedpreserved the file. Holding the journal open for read/write sharing without delete sharing made the full warm report that compaction failed and exit 0. The original bytes survived. After releasing the handle, the next warm removed the two stale lines and the temporary file..newremained, and a normal retry replaced the file successfully.These runs exercised the real GPU pipeline cache and Windows file handling. I did not run a game, switch translators, or simulate a power loss.
e8f517e2a5to29caad42eeClosing this old-engine PR because post-merge replaced the preload marks it changes; the mark there is
preloaded.txt(preload.rs:38-41). It can be redone on post-merge if the problem shows there.Written with AI assistance (Claude Code).
Reopened: Main is the default branch again, so the close note above no longer applies.
Written with AI assistance (Claude Code).
WIP: [pr-fix][startup][shaders] Preload: a full warm drops stale marks from warm-done.txt (DARNER_PRELOAD_KEEP_MARKS)to WIP: Preload: a full warm drops stale marks from warm-done.txt (DARNER_PRELOAD_KEEP_MARKS)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.