Page 1 of 1

Windows Performance Analyzer shows negative DPC numbers on dxgkrnl.sys - Possibly an error of AMD drivers?

Posted: 06 Aug 2024, 12:02
by AlchemyTweaks
The beginning​
Let's start from the beginning. I use the Windows Performance Toolkit for performance analysis that I conduct systematically. Additionally, I use it for comparisons (before and after changes that I test). Recently, I decided to start taking measurements for this exact reason—to determine if a particular setting provides a detectable performance boost in the system.

Re: Windows Performance Analyzer shows negative DPC numbers on dxgkrnl.sys - Possibly an error of AMD drivers?

Posted: 13 Aug 2024, 11:11
by Chief Blur Buster
Monotonic counters (e.g. RTDSC) can tick out of phase on different cores of some CPUs.

When benchmarking utilities gets a timestamp from one core, and then afterwards a timestamp from a different core, you can get negative time deltas. Sometimes this is harmless and sometimes this is harmful. I don't have enough information if you're witnessing some glitching/issues from this.

For critical benchmarking, try forced thread affinity for critical DPC timestamping tasks. This will help avoid negative numbers in SOME cases. Obviously, don't do this if it isn't causing problems.

For programmers of benchmark utilities: Some APIs (e.g. QueryPerformanceCounter() for example) check against reverse-ticking at chip-level counter (e.g. RTDSC quirks on some multicore CPUs), so you can program benchmarking utilities that don't have side effects from backwards ticking.