"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

The HPET bug: What it is and what it isn't

mat 26.04.2018 - 11:30 44592 16 Thread rating
Posts

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: sbg
Posts: 24635
I had a look at changes of the QPC API function when 1809 was released and compared it to previous versions. There is only a small difference and that's a nicely solved integer multiplication to unify the timestamp to 10 MHz for TSC (as QPC mode). My guess is that this implementation is actually faster by a few cycles, but I did not measure it.

These are parts of the code of QueryPerformanceCounter() for RS4 and prior on the left and RS5+ on the right. They don't show everything, but I apparently chose to screenshot only those lines of code, can't remember why. :p


You can also see here that both just rely on a call to RDTSCP, although there are multiple codepaths available for fencing on other platforms. This was on Intel Coffee Lake.

I also played around with their new way to figure out if there is any loss of precision due to the new QPC code. These are two measurements of 1 second each showing different calculation methods and their precision. Of course the integer multiplication is the fastest, although it's only precise to ~100 ns:


The additional latency shouldn't have anything to do with the QPC function itself. That said there is much more going on behind the scenes that could intervene with DPC latency in general. I think more details are needed to have a look at this. Screenshots from multiple TimerBench runs, DPC Latency checker and the full specs of the tested systems.

Edit: Sorry for the overshare, I wanted to post this stuff a while ago but never got around to it.

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: sbg
Posts: 24635
TimerBench 1.4

timerbench-256_240633.png

  • Detection of iTSC QPC mode with 10 MHz (since Windows 10 RS5)
  • Fixed crashes when loading result files
  • Implemented multi select for result file dialog to load more than one result at once
  • You can start more than one measure process dialog now inside one TimerBench application
  • Measure process now additionally takes a process id to target a specific application for measurements
  • New icon! Let's go professional.
  • Updated all libraries to their latest version: HWiNFO 6.12, PresentMon 1.5.2, EasyHook 2.7.7097
  • All executable and DLL files are now signed with my SHA2 signature
  • Compiled with Visual Studio 2017 (staticly linked MFC und VC)

Download: TimerBench 1.4 (172 MB, Self-extracting Exe, CRC32: 39a1a4c7)
Prerequisites: DirectX 11
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz