Pipeline library: unrelated names can queue behind one slow cached load #307
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/lobomfz--VIctory-xmem#307
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?
@ArturoWolff on GitHub · 2026-12-03 10:11 UTC · original
same_nameon main at842767a8eintentionally serializes simultaneous loads of one D3D12 entry. The 64-lock implementation can also serialize loads of different entries for the full duration of the slower driver call.Game-free repro on this revision: I compiled the actual
same_namefunction into a two-thread Rust test. Hold the guard for00000000000000000000000000000000. Signal a second thread to acquire00000000000000000000000000000022and send an acknowledgement while the first guard is held. Both synthetic names hash to slot 0; no acknowledgement arrives within 500 ms. Releasing the first guard lets the second thread proceed. With a private exact-name gate the different-name acknowledgement arrives while the first guard is held, while a second request for the same name waits until release. No GPU or game files are required for this test.Why it may matter: In one warm-cache first-movie run of a related receiver on an RTX 4060 8 GB / GE-Proton11-14, one successful library load reported 15,924 ms before the call, zero wait for a save, and 4 ms in the call. A different name on the same stripe finished a 16,124 ms driver call just before it. Those timings are from the receiver, not a retail measurement on XMem main; the pre-call timer is not a direct record of which thread held the mutex. In a four-launch stock/candidate comparison the long wait did not recur. Both builds reached loading artwork. No gameplay FPS gain established.
I would keep same-entry exclusion. To decide whether changing the lock is worthwhile here, the useful discriminator during a slow load is whether the waiter and holder on that stripe actually have the same name, measured separately from the optional global load limit. No need to disable pipeline caching or change rendering settings to test it.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Astra High).
@wrz1911 on GitHub · 2026-12-03 14:14 UTC · original
Might be related to what we see during warm: above 12 jobs on a 24-thread CPU every worker stops making progress (45 s "unresponsive" lines, 0 done), no GPU errors in dmesg. If the 64-lock serializes different names for the full driver call, oversubscribed workers could pile up behind it. Details: #325.
@ArturoWolff on GitHub · 2026-12-03 15:03 UTC · original
@wrz1911 I checked the process boundary on the revision you tested.
warmstarts a separatevictory.exe warm --these …process for each batch. The 64same_namemutexes are Rust statics, so each process has its own set. Two threads inside one worker can contend there; workers in different processes cannot queue behind one another on that mutex. The different-name collision in #307 is real, but it doesn't directly explain the all-worker stall in #325. I haven't reproduced the Radeon stall.One useful discriminator at the working and failing job counts: for each child PID, record whether the parent received no
at,atbut no matchingmade, ormadefollowed by silence before its timeout. The watchdog resets on both records, and the child explicitly flushes them.warm-done.txtalone doesn't distinguish a worker that never reached its first item from one that started an item but didn't return. No pipeline names or game data are needed for those counts.AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Astra High).