Repository navigation
Conversation
prepare_workers passes host::system_commit(), which is in bytes (commit pages times the page size), to workers_for(cores, free_mb), which divides by 3072 as MiB. The commit bound therefore never applied: the count was always the logical processors less four (at most 32), so 16 threads with 6 GiB of commit left got 12 workers instead of 2. Reported by pickles976 on xcl-dev#2624. The commit figures are now converted to MiB in a new workers_for_commit, which prepare_workers calls; workers_for and its tests are unchanged, and XCL_PREPARE_WORKERS still sets the count directly. The new test passes the figures in bytes; without the conversion it fails (12, expected 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BuVT2rKpD9DAmDGg1zuzbB
Contributor
|
Windows verification of exact PR head
I tried a guarded preparation-on title launch with isolated data/DXIL caches. I stopped it after about 30 seconds, at 292 of 26,503 shader records translated, before it reached the changed worker-spawn stage or title frames. It is not a completed smoke result. I did not build/run the |
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.
prepare_workerspasseshost::system_commit(), which is in bytes (commit pages times the page size,host.rs:11-22), toworkers_for(cores, free_mb), which divides by 3072 as MiB (shaders.rs). So the 3 GB-per-worker bound never applied, and the count was always the logical processors less four (at most 32): 16 threads with 6 GiB of commit left got 12 workers instead of 2. Reported by @pickles976 in #2624 (comment); introduced with the worker processes inb09acbc(#2624).The commit figures are now converted to MiB in a new
workers_for_commit, whichprepare_workerscalls.workers_forand its tests are unchanged;XCL_PREPARE_WORKERSstill sets the count directly.What is in it
crates/xcl/src/shaders.rs:workers_for_commit(cores, used, limit)(bytes → MiB, thenworkers_for), called byprepare_workers; testpreparation_workers_take_the_commit_left_in_byteswith the figures in bytes.Tested
30b0eb9bwith Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257's patch; Rust 1.100.0,x86_64-pc-windows-gnu, release. Not Windows.cargo test -p xcl --lib shaders::tests(test binary under Wine): 12 passed, 0 failed, 0 ignored. With the conversion taken out, the new test fails (left: 12, right: 2).K32GetPerformanceInfogives under Wine here (a small probe calling it assystem_commitdoes): limit 64,209 MiB (the RAM, no swap), 57,580 MiB left, 16 threads: 12 workers both before and after this change. So on this machine the processor bound decides and the change makes no difference; it does on hosts with less than about 3 GB of commit left per worker.Regression run
scripts/linux/smoke.shof Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257 (the Linux port ofscripts/smoke.ps1, closed, not merged) under Wine, not withsmoke.ps1. A retail title, 120 s,VKD3D_CONFIG=ignore_shared_fence,no_descriptor_heapon all, no input. Thenvidia-devand PR runs hadXCL_PREPARE=0, so they do not reach the changed code (see Not tested).main (made last night for another PR, same setup):
nvidia-devaf2cecc(the base):PR:
af2ceccwith the same settings ended at 10 s: an access in Wine'sheap_free_blockthrough a corrupted block header on a title thread building compute pipelines (reported as0xc00000fd). It did not happen in the next two runs (the base and PR blocks above). The preparation code was off in that run; I am looking into it separately.Not tested
XCL_PREPAREon): the runs above leave it out, and on this machine the worker count is the same before and after.shaders::testsfilter was run.peak commitis not reported under Wine (0 MB on all).AI use
🤖 Generated with Claude Code