darner-gpu: isolate watch, queue and present state across parallel tests #565
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!565
Loading…
Reference in a new issue
No description provided.
Delete branch "groster17800/Darner:pr/gate3-watch-locks"
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 #389
Thank you to Cyber-Croissant for filing #389 with the parallel
darner-gpufailure breakdown. UsingRefs #389rather thanFixes #389because two separate items remain outside this test-only PR:watch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queuealso fails deterministically in--test-threads=1due to a product bug inRemapQueue/HostHeap::new(#563).darner-shader'soracle64::legacy_mul_forms_are_exactruntime anddarner-loader's intermittent workspace failure inconsole_insn::testsare untouched here.Contributor role (optional)
What it changes
official/mainc8258f9):cargo test -p darner-gpu --lib --lockedfailed:44.93s):watch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochs(crates\darner-gpu\src\watch.rs:9823:9)45.05s):queue::tests::a_line_in_hand_outlives_its_queue_and_is_retired(crates\darner-gpu\src\queue.rs:2316:9) andwatch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queue(crates\darner-gpu\src\watch.rs:7616:9)cargo test -p darner-gpu --lib --locked -- --test-threads=1,175.29s) also failed 2 tests (1803 passed; 2 failed; 81 ignored):pipeline::make::tests::a_capped_draw_waits_once_then_drops(crates\darner-gpu\src\pipeline\make.rs:3416:9,waited its cap (4.2µs))watch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queueTest-only fixes in
#[cfg(test)]across 22 files incrates/darner-gpu/src/, using the existingcrate::watch::one_view_test()lock (from #262 / #224) and upstream'stitle_memory_freed/title_memory_allocatedcache invalidation pattern:crate::watch::one_view_test()on tests reachingHost::execute,present_planes,bump_ahead_gen,remapped_ranges,fence::signal, orwatch::asked/writesdirectly:Host::executecallsHost::submit->watch::ask_once_end(), clearing globalJOURNAL.aheadmid-test for concurrentwatchtests. Where another lock (texback::POOL_TEST_LOCK,host::uav_pool::SERIAL) is also held,one_view_test()is always acquired first to prevent lock-order inversions.RES_CACHEaroundVirtualAlloc/VirtualFreeand ensure unwatched neighbours: calltitle_memory_freed(ptr, 0)(ortitle_memory_allocated(at, len)forhost::refresh_tests::title) so recycled virtual addresses cannot reuse stalewatchable: false/ reservation entries inRES_CACHE. Inwatch::tests::ask_rest_falls_back_per_piece_when_touching_unwatched_neighbour, retry adjacent(p, q)allocation untilVirtualAlloc(p + 2 * PAGE, ...)succeeds sop + 2 * PAGEcannot land inside an earlier test's unfreed write-watched block in serial runs.queue::testssharing globalstatic WAITING: takecrate::watch::one_view_test()ina_present_keeps_another_queues_wait_for_one_frame,a_line_in_hand_outlives_its_queue_and_is_retired,a_retired_line_is_not_run, anda_queued_wait_or_signal_keeps_its_fencesorelease_held(false)cannot pop another test'sHeld::Run.PRESENTED_USinpipeline::make::tests::a_capped_draw_waits_once_then_drops: holdone_view_test()and resetPRESENTED_US.store(0, Ordering::Relaxed)so earlier present tests do not leave a >20 s timestamp that makesheld_room()returnDuration::ZERO.How it was tested
Tested revisions:
ef9024fonpr/gate3-watch-locks(based onofficial/mainc8258f9)pr/remap-published-on-new-heap149c5f4):c52c07aCommands and results:
official/mainc8258f9)c52c07a)cargo test -p darner-gpu --lib --locked(10x parallel)1805 passed; 81 ignored)1806 passed; 0 failed; 81 ignored,32.16s–35.54s)cargo test -p darner-gpu --lib --locked -- --test-threads=1(serial)1803 passed; 2 failed; 81 ignored,175.29s)1806 passed; 0 failed; 81 ignored,123.80s)cargo test --workspace --locked --no-fail-fast -- --skip oracle64::legacy_mul_forms_are_exactonc52c07a(587.1s,rc=101):0failures (darner-gpulib:1824 passed; 0 failed; 81 ignored;darner-shaderlib:567 passed; 0 failed; 16 ignored; 1 filtered out) exceptdarner-loaderlib (96 passed; 2 failed), whereconsole_insn::tests::clzero_on_a_guarded_line_goes_through_the_guardandconsole_insn::tests::an_sse4a_instruction_becomes_sse2failed.darner-loaderis untouched fromofficial/main(c8258f9), andcargo test -p darner-loader --lib --lockedalone passed1/1onofficial/mainc8258f9(98 passed; 0 failed) and5/5onpr/gate3-watch-locksef9024f(98 passed; 0 failed).darner-shadercrash repro check (cargo test -p darner-shader --lib --locked -- --skip oracle64::legacy_mul_forms_are_exact):0crashes /STATUS_ACCESS_VIOLATION(567 passed; 0 failed; 16 ignored; 1 filtered outin573.13sand566.82s, plus491.12sin the workspace run; stopped after 2 clean dedicated runs).Changes a default: no (test code only).
A/B result: not applicable (test-only isolation changes).
Gates run on PR 2 (
ef9024f):cargo clippy --workspace --all-targets --locked -- -D warnings): passed (exit 0,13.8s)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings): passed (exit 0,14.7s)cargo xtask policy):asset policy: 576 files ok(exit 0)cargo test --workspace --locked): run on combinedc52c07askippingoracle64::legacy_mul_forms_are_exact(see results above).Gameplay, when relevant: not run in game (tests only).
Shader wave sizes tested, when relevant: n/a.
Hardware dependence: Windows D3D12 host +
crate::watchtests.Coverage gaps: full
darner-gpu --lib10x verification ran on combinedc52c07a(with PR 1) becausestreamed_texture_written_through_an_alias_reaches_a_full_queuerequires PR 1;oracle64::legacy_mul_forms_are_exactwas skipped in workspace testing due to runtime; dedicateddarner-shadercrash repro stopped after 2 clean runs (+1 workspace pass).Checklist
main.docs/asset-policy.md.pr/remap-published-on-new-heap) forwatch::tests::streamed_texture_written_through_an_alias_reaches_a_full_queueChecked for overlap
RemapQueue::cursor)🤖 Generated with Claude Code
[pr-tests] darner-gpu: isolate watch, queue and present state across parallel teststo darner-gpu: isolate watch, queue and present state across parallel testsView 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.