Windows 8 High DPC latency Fix

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by Penal Stingray, Jan 27, 2013.

  1. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    Programs can use LAPIC and HPET directly (not through QPC function). HWINFO for example has setting "use HPET" for CPU clocks calculation...
     
  2. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    In the end, my recommendation would be:
    1) Enable HPET in the bios
    2) Open a command prompt (admin) and type bcdedit /deletevalue useplatformclock

    This way, the best scenario is always chosen (invariant TSC for supporting CPUs and HPET for the rest). :)

    Like I said earlier, this blog post explains the chronological developments (since Windows 2000) on this issue very well.
     
    Last edited: Feb 19, 2013
  3. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    I executed bcdedit /set useplatformclock false to be sure...
     
    Last edited: Feb 19, 2013
  4. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    You only want that if your CPU supports an invariant TSC, otherwise you will want to use HPET. If you force useplatformclock false and your CPU has an older TSC, you will run into the multiple TSC drift problems, etc.

    Safest bet is to really delete useplatformclock from the BCD.
     

  5. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    To ensure avoiding of TSC+LAPIC or TSC+HPET usage:

    if CPU has 'invariant TSC'
    then 'bcdedit /set useplatformclock false'
    else 'bcdedit /set useplatformclock true'

    I mean I am not programmer at Microsoft so I don`t know full and detailed Windows logic in case of 'bcdedit /deletevalue useplatformclock'...
     
    Last edited: Feb 20, 2013
  6. -Tj-

    -Tj- Ancient Guru

    Messages:
    18,097
    Likes Received:
    2,603
    GPU:
    3080TI iChill Black
    and how does one know if cpu has invariant TSC?



    I just tried it, I also re-enabled disabledynamictick= no and i didnt see anything special by Latencymon other then occasional 1000us kernel register spike by first start (could be C1E fault)..

    Im gonna try BF3 to see whats up.

    I presume if you delete this value useplatformclock, then its like this option doesnt exist even if it was enabled before.
     
  7. tsunami231

    tsunami231 Ancient Guru

    Messages:
    14,725
    Likes Received:
    1,854
    GPU:
    EVGA 1070Ti Black
    Now correct me if i wrong but is cpu os invariant tsc then shouldnt hpet be disabled in Bios too?

    Most Cpu since 1st gen i7 are invariant tsc no?
     
  8. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    I think I've already linked this post 3 times, here's the 4th! :)
    So, basically, let windows do it's job! :)

    Tj,
    If the processor supports invariant TSC, the clock speed from RDTSC will always be constant, even with the processor in a low power state. For example, my 2600K keeps a constant 3400MHz counter frequency, even when the CPU is at 1600MHz (TSC counters increase +1 for each clock tick). Check my post above, with the pics.
     
  9. bishi

    bishi Master Guru

    Messages:
    575
    Likes Received:
    17
    GPU:
    GTX 1080 SLI
    To summarise what everyone has been saying seeing as people are just changing what they feel like and reporting placebo results..... Especially in Windows 8.

    Enable HPET in BIOS (64-bit if you have the option).

    Stop adding **** to your BCD because it was already working right.

    Ignore the performance counter frequency. Lower is not always worse, depends what it is measuring.
     
  10. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    AIDA64 shows checkbox 'Invariant TSC' in CPUID node. CPUID - processor instruction that returns bit flags of CPU features, so many tools can show that stuff...

    As for "delete this value useplatformclock" we don`t know exactly what Windows (either Vista or 7) do with timers. In cases of 'useplatformclock=true' or 'useplatformclock=false' we do.
     

  11. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    They are completely independent things - TSC and HPET. They don`t know about each other. Question is - which to use for OS needs? Nobody can prevent programmer to use either TSC processor instructions or HPET in-out instructions in their code (unless HPET is disabled in BIOS).
     
    Last edited: Feb 20, 2013
  12. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    Good question. It seems not. Intel's IA-PC HPET (High Precision Event Timers) Specification 1.0a states that HPET can be used for:
    So, basically, HPET can have many more uses outside of QPC calls.
     
  13. -Tj-

    -Tj- Ancient Guru

    Messages:
    18,097
    Likes Received:
    2,603
    GPU:
    3080TI iChill Black
    Ah ok yes its supported, but it says only Timer stamp Counter (TSC).

    I tried Bf3 and it felt kinda spikey, some occasional 1-2sec fps slowdowns., or was it Quadro driver fault.. But I know i didnt have that yesterday in same map, although i used Geforce variant + disabledynamictick=yes and setplatformclock=true
     
    Last edited: Feb 20, 2013
  14. tsunami231

    tsunami231 Ancient Guru

    Messages:
    14,725
    Likes Received:
    1,854
    GPU:
    EVGA 1070Ti Black
    Well according to Aida64 i7 920 supports it but no combination I can find ofr hpet in bios or combination of useplatformclock false or true, makes aida 64 so that Invariant Time Stamp Counter is enabled its shows it is supported that about it
     
  15. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    Guys, you can`t disable TSC as it is part of CPU features. It is present or not in CPU.
     

  16. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    There is more to the "invariant" TSC than just being invariant, because you have one for each core in a system and they need all to be in-sync. I know Nahalem+ and Bulldozer+ are good to go, but (if I'm not mistaken) Phenoms report invariant TSC but the sync between cores is not 100% guaranteed. That's why windows tests this setting at boot.

    The setting of useplatformclock is clearly stated by MS to be used as a debugging option. I personally don't know what else can that option force to be enabled/disabled globally. Imagine you have a good to go CPU, but by setting useplatformclock=false you are effectively forcing HPET or other ACPI timers out, that can be used for non-realtime purposes? (hardware power-states for example).
     
  17. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    If your CPU has no 'Invariant TSC' you just need to check if Windows has affected by 'drift of TSC' as wrote Vbs.
     
  18. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    According to text at your link Windows 7 tests. But what about Vista and 8?
    I don`t argue with you. It is clear that one must perform testing before and after switching any OS setting/tweak...

    Your question may be splitted:
    Does Windows (Vista, 7, 8) use platform clocks outside QPC context in case of 'useplatformclock=false'?
    Does 'useplatformclock=false' prevent third-party soft in OS use platform clocks?
     
  19. Vbs

    Vbs Guest

    Messages:
    291
    Likes Received:
    0
    GPU:
    Asus Strix 970, 1506/7806
    For a quick test:
    1) Open any monitoring tool that shows the CPU frequency (CPU-Z for example)
    2) Fire up PC Clock Timing
    3) Hit 'Refresh' while keeping the CPU idle, and repeat with some load
    4) Does the "Clock speed from RDTSC" stays constant?

    If it stays constant, you have an invariant TSC. If it changes mimicking the CPU frequency, it's not invariant.
     
  20. mbk1969

    mbk1969 Ancient Guru

    Messages:
    15,541
    Likes Received:
    13,556
    GPU:
    GF RTX 4070
    'useplatformclock [ yes | no ]
    Forces the use of the platform clock as the system's performance counter.'

    - i.e. QPC only. It doesn`t say about other usage of platform clocks
     

Share This Page