cores: DARNER_CCD_SPLIT puts the title's threads on one Ryzen die and ours on the other (off by default) #495
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!495
Loading…
Reference in a new issue
No description provided.
Delete branch "RomanQ/Darner:pr/ccd-split"
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?
Contributor role (optional)
What it changes
cores.rsonly places threads on processors with two kinds of cores or two sizes of L3 (V-Cache).This adds
DARNER_CCD_SPLIT(off by default;1orreverse), ported from VIctory-NVIDIA #730 (autogenes-sudo's layout and method). On a processor of one processor group, one class of core and two or more last-level caches of one size, a thread nameddarner-ccd-splitwalks the process's threads once a second and gives each new thread the CPU sets of its side, by its name: the title's threads (no name, ortitle-main) on die 0, ours (darner-*,dstorage*) on die 1, the rest left alone.reverseswaps the sides for an A/B run. Anything else logs once and places nothing. It is not combined withDARNER_SUBMIT_CORE_ALONE=1, and with the split on, the threads that ask for the fast cores themselves (select_fast_cores) take the layer's die.A row is added to the switch table in
docs/dlss.md. The only figures in the code and docs are VIctory-NVIDIA #730's (5900X, RTX 5060, 63 pairs of 15 s phases: title on CCD0 and layer on CCD1 4.3 ms ± 1.0 a frame faster than no placement, the reverse 9.7 ms ± 1.1 slower), credited there.How it was tested
Tested revision:
ed05942(this branch, ond91d8e4) for the gates below. In the game: the same change on earlier bases (the 2026-12-04 runs onb375c54, onf3840d7). That build also carried a second switch from #730 (DARNER_FRAME_DIE, off in every run), which I took out of this pull request; the split's own code is the same.Commands and results:
ed05942:cargo clippy --workspace --all-targets --locked -- -D warnings: passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed.ed05942:cargo test --locked -p darner-gpu --lib, two runs: 1778 passed, 2 failed (gpu_owned::tests::concurrent_faults_on_same_block_serialize_single_readback, which also fails 3 of 3 when run alone;host::refresh_tests::refresh_front_zero_arc_matches_and_runs_due, which passed 3 of 3 alone), then 1780 passed, 0 failed.cargo test --locked -p darner-gpu --lib cores::: 8 passed.b706c2d(the same change beforeDARNER_FRAME_DIEwas taken out; the other crates are the same):cargo test --workspace --locked --no-fail-fast: every target passed exceptdarner-shader --lib, 559 passed, 1 failed (emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders). Earlier runs there also had onedarner-gpu --libfailure each (watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs; with--test-threads=1,watch::tests::ask_once_by_res_splits_reservations_without_refusals), both passing when run alone.concurrent_faults_on_same_block_serialize_single_readback, thedarner-shadertest and the twowatchtests are listed in the open #389 as failing onmain;refresh_front_zero_arc_matches_and_runs_dueis not listed there. This pull request does not changedarner-shader, which does not depend ondarner-gpu. I did not run the gates onmainitself.Changes a default: no.
A/B result, for a change of a default (on for everyone) or a speed claim, on the cards it affects: no default changes and no speed claim here. No A/B of
DARNER_CCD_SPLITon and off was run on the same build, so no frame-rate figure of my own is given. It was checked by playing with it on and reading its log lines:Gates run on that revision (the three in AGENTS.md; there is no CI), or "none": gates 1 and 2 on
ed05942, green. Gate 3 in full onb706c2danddarner-gpu --liboned05942, not green for the tests above.Gameplay, when relevant: RTX 4060 Ti 8 GB, Ryzen 9 5900X, Series S profile,
--res 1080to1440, DLSS quality, DLSS frame generation 2x, ray tracing off (F1,DARNER_MENU_RT=off, in the 2026-12-04 runs; the 2026-12-02 run's log is no longer here, so its setting is not known).Shader wave sizes tested, when relevant: not relevant (no shader change).
Hardware dependence: only acts on two-die processors of one kind of core (5900X, 5950X, 7900X, 9950X class). Run only on a 5900X; untested on the others, on X3D parts (where it should log and do nothing), on hybrid Intel and on systems with more than one processor group.
Coverage gaps: no A/B of my own;
reversenot run in the game.Checklist
main.docs/asset-policy.md.Checked for overlap
crates/darner-gpu/src/cores.rs(the prelude worker's priority), a different change. #431, #205 and #80 change other parts ofdocs/dlss.md.🤖 Generated with Claude Code
I checked
two_diesated05942with a synthetic one-group topology. With two CCDs, two equal 16 MiB L3 caches per CCD, and logical processors numbered by CCD, the four cache masks cover 0–7, 8–15, 16–23 and 24–31. The unmodified selector returns 0–7 for the title and 8–15 for the layer. Both sets are on CCD 0. A control with one L3 per CCD returned 0–15 and 16–31, as intended.This layout matters because some AMD processors have two independent L3 caches on the same CCD. The test exercised the selector only; it did not set thread affinity or measure performance. Could the detector check that its two selected masks belong to distinct physical dies, and skip placement when it cannot establish that? A regression case with the four masks above would distinguish the two layouts. AMD EPYC 7002 architecture, §2.3 and Figure 2
ed05942217to67aaedf4ccThank you, confirmed. Your four masks through the unchanged
two_diesated05942(before the rebase; as a temporary test) returned logical processors 0–7 and 8–15, both on CCD 0, with 16–31 left out.Fixed in
67aaedf(the branch is now rebased onmainatc8258f9):two_diesnow also takes the dies Windows reports (GetLogicalProcessorInformationExwithRelationProcessorDie, read by a newprocessor_dies). Each of the two selected cache masks must lie inside one die's mask, and not the same die; otherwise it returnsNoneand nothing is placed. That also covers Windows reporting no dies, one die for the package, and a one-CCD part with two L3s (3700X).two_caches_on_one_die_are_not_two_dies: your four 16 MiB masks with CCDs 0–15 and 16–31 giveNone; one die with two caches givesNone; the control with one cache on each CCD gives 0–15 and 16–31. The existing test also checks that no dies reported, and both caches on one die, giveNone.0xfffand0xfff000), and the real readers still select 0–11 and 12–23, as before.67aaedf, after the rebase: both clippy runs passed;cargo test --workspace --locked --no-fail-fast: 33 targets, 3525 passed, 0 failed.Not tested: a Zen 2 machine itself, so how Windows reports
RelationProcessorDiethere is not checked; when it does not separate the CCDs, the split stays off, as you suggested.A/B of
DARNER_CCD_SPLITon the same build, as the description said was missing.Build:
67aaedf(this branch), diagnostics profile. Ryzen 9 5900X, RTX 4060 Ti 8 GB, Series S profile,--res 1080to1440, DLSS quality, frame generation 2x, ray tracing off. The same scripted route each run (a probe mod walks three stretches from the same save), runs interleaved on, off, on, off, on, off after one warm-up run that is left out.Median frame time per stretch, mean of 3 runs each (± standard deviation):
Per pair (on run, then the next off run), off − on: avenida −0.5, +2.3, +3.3; estación −0.1, −0.2, +3.3; base −0.6, −1.1, +2.9. Most of the mean comes from the last pair, whose off run was slower in every stretch; paired the other way (off, then the next on), the differences are mixed in sign. I read this as no difference I can tell from run-to-run noise on this machine.
The card was the limit here: 43–51 ms of card time in 52–61 ms frames, so there was little processor time for the split to save. #730's gain was on an RTX 5060 at other settings; this does not contradict it, it just does not show it on a card-bound setup.
All 7 runs ended normally (0 crash records).
[pr-feature] cores: DARNER_CCD_SPLIT puts the title's threads on one Ryzen die and ours on the other (off by default)to cores: DARNER_CCD_SPLIT puts the title's threads on one Ryzen die and ours on the other (off by default)Test needed — commit
67aaedf4; what to check:cores.rsonly places threads on processors with two kinds of cores or two sizes of L3 (V-Cache).This adds
DARNER_CCD_SPLIT(off by default;1orreverse), ported from an earlier fork-NVIDIA #730 (autogenes-sudo's layout and method). On a processor of one processor group, one class of core and two or more last-level caches of one size, a thread nameddarner-ccd-splitwalks the process's threads once a second and gives each new thread the CPU sets of its side, by its name: the title's threads (no name, ortitle-main) on die 0, ours (darner-*,dstorage*) on die 1, the rest left alone.reverseswaps the sides for an A/B run. Anything else logs once and places nothing. It is not combined withDARNER_SUBMIT_CORE_ALONE=1, and with the split on, the threads that ask for the fast cores themselves (select_fast_cores) take the layer's die.A row is added to the switch table in
docs/dlss.md. The only figures in the code and docs are an earlier fork-NVIDIA #730's (5900X, RTX 5060, 63 pairs of 15 s phases: title onEvidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.Test report: commit
67aaedf4(this pull request's head)Written with Claude Code; the runs are mine.
67aaedf4. Series S profile,--res 1080to1440, DLSS Quality, DLSS frame generation 2x, ray tracing off (F1 RAY TRACING off),DARNER_ALIAS_SHARE=1,DARNER_ALIAS_DIRECT=1,DARNER_TEX_PARK_LESS_SETTLE=1,DARNER_PARK_COMPACT_WASTE=1.scripts/bench.ps1. A probe mod walks the same three stretches from the same save, and the measured window is the first 330 s after the world's first frame. After one warm-up run, which is left out, the runs alternate: on, off, on, off, on, off.summary.json.DARNER_CCD_SPLIT111bench.ps1notes, the percentiles cover only the recorded part.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.