[pr-performance] Opt-in DARNER_LATE_FENCE=1 to avoid CPU stalls on in-flight cross-queue fence waits #93
Loading…
Reference in a new issue
No description provided.
Delete branch "hingeowl/Darner:vercetti/late-fence"
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?
Summary
Adds opt-in
DARNER_LATE_FENCE=1(off by default) to avoid CPU stalls on in-flight cross-queue fence waits when running on a single FIFO host queue.When a waiting queue encounters
Ask::Wait(fence, value)orJob::Wait(fence, value)whose signal is already queued in-flight on the host relay (Late::Signal),host::late_fence_met()allows the waiting queue to proceed behind the in-flight signal instead of stalling the sender thread for the GPU to drain. Guarded off automatically whentwo_queues::on()is active.Provenance
https://github.com/lobomfz/VIctory-xmemcommit9d72949c520646e44a1cdb1f451fd1b6f2de07f9(GPL-3.0-or-later), adapted to Darner'sFenceRefand guarded againsttwo_queues::on().main(b3a615f).Validation
cargo test --locked -p darner-gpu --lib queue::behindpassed.DARNER_RELAY=2, canonicalplay.rssettings,DARNER_LATE_FENCE=0vs1, same binary):DARNER_LATE_FENCE=0(R1 / R2)DARNER_LATE_FENCE=1(R1 / R2)7,982/7,9177,556/7,8411.77%drift20.5/21.9(21.9)20.9/22.2(22.2)+0.3 FPS49.0/46.2 ms(49.0)47.1/46.4 ms(47.1)-1.9 ms63.1/57.7 ms(63.1)60.1/58.9 ms(60.1)-3.0 ms34.1/31.5 ms(34.1)32.2/32.4 ms(32.4)-1.7 ms18.4 ms17.3 ms-1.1 ms65%/21,799 MB64%/21,891 MB-1.9 msmedian frame time,-3.0 msP95,-1.7 mssubmit, visually verified spotless withnonBlack=99.99%,magenta=0%).mainb3a615f:19.4 FPS,49.6 msmed,65.0 msP95,35.1 mssubmit,7,946draws.)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.