MMM
Results 1 to 25 of 117

Thread: DPC Latency Checker

Threaded View

  1. #34
    Xtreme Addict
    Join Date
    Sep 2010
    Location
    US, MI
    Posts
    1,680
    I use hpet.

    I use this code, this is the ahk scripting ver of it.
    Code:
    DllCall("ntdll.dll\NtSetTimerResolution", UInt, 1)		;min allowed setable, much lower then specs say is allowed, but the result is not much lower then 0.500ms supposed min value
    What that does is essentially cut my dpc latency in half.
    It was afterwards when I found out about hpet.
    After enabling hpet my dpc latency was on avg around 10-15us lower (using including the script code above I posted).

    The reason being, I think, is because hpet is a higher precision timer.
    Higher precision means it's possible to set the timer even lower then the norm.

    What I mean by that, here's an example:
    Say for ex. you're dev'ing your own os...
    You set the min hex code for thye normal timer, say it equ's to 1ms.
    Now you do the same with hpet, say that equ's to say maybe 0.5ms.

    That's the idea and that's how it works out.
    I don't know if you guys will understand or not...
    Hpet IS faster, at least on my system, but only after I've set the user timer in windows.

    There is one more timer mod other then the "ntdll.dll\NtSetTimerResolution".
    I think it might of been ExNtSetTimerResolution, it's been a while so I'm not sure.
    Anyways to beable to setup that other timer to a diffrent value, one needs to be the kernel it's self to doit.
    It means you have to get into ring0 by hacking the kernel irq thingamajigers, and from there you could possibly set the timer.

    Prob is, once it's possible, hehe, the system will be unlike most systems.
    The clock it's self will run to fast or to slow.
    Though I believe it's very possible to patch that code out for the clock to make it right.
    Anyways it's not an easy mod, and since I don't have any ring0 code I can't play with it.

    There was a program out there that did essentually the same thing, called speedpig.
    It was a addon hack for an old dreamcast emulator.
    It doesn't work on the later os'es...

    You could do some really neat stuff though with it.
    By slowing down the main system timer, stuff like dl'ing, instead of say 5k a sec, it would register say 100k a sec lol.
    By speeding it up, it would instead say 1k a sec, etc etc.

    It was meant for games that needed alot more cpu time then otherwise possible.
    Say for example, i slow the timer down by 10x, then esentually my cpu is really proccessing 10x more per sec then normal, thing is that 1sec is really 10secs...
    I bet most won't understand that one either lol.

    There's also games that don't need the power, that just need to get things done as fast as possible, much like pc games are...
    In which case you would probably set the timer to 1.25x or 1.5x or 2x, ext.
    So you weren't wasting time processing data that wasn't there...

    If your cpu is waiting for the code to finish, it's slow.
    If it's able to finish small code faster then then norm, then it's faster.

    It's really the holy grail of cpu...
    Though on pc, generally you'de want a faster timer.
    Unless your cpu wasn't fast enough, in which case you might slow down the timer (I would not recommend this unless benching mem, or unless you had some sort of game that needed 2x the cpu power then you currently have).

    There's a big issue though other then just the clock.
    Your mem/hd controller timings are all baised off the main pic timers, pic, apic, hpet and etc.
    Well actually scratch that, the mem is actually independent of this timer these days.
    It's has it's own base clock, each stick does.

    Looks like my post has already gotten to long I'm gonna end it.
    Anyways that one script code I posted above is ahk script, I think there's a way of doing it via rundll32 on the cmd line.
    But there is no way of using the read ver of the cmd on rundll32 as far as I know.

    ^^ :P

    Edit:
    Oh and thanks zalbard for bumping the thread, this thread is probably gonna be kinda important for win8.
    Last edited by NEOAethyr; 08-17-2012 at 07:40 AM.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •