Re: getting CPU speed and/or type from within a driver?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you use this only for diagnosing the problem,
the CPU type and "speed" can be found in
HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\x

CPU clock rate floats because of power management tricks, so delay of StallExecutionProcessor indeed is not fixed...

A good hardware design always provides sensible feedback to the host driver and avoids guesswork.

Regards,
--PA


Andreas Reiff wrote:
Thx for your answer!

You are kind of right.. but I have found no way to circumvent the problems yet.

The problem is with delays on the PCI bus which are different for each device. We have custom hardware on the bus, and some transactions do not get an acknowledge. So we have to wait for a certain amount of time.

It seems now that this time is different depending on CPU/board (each CPU has a unique kind of board and PCI system).

Rather strange, since I use KeStallExecutionProcessor(1), which shouldnt cause any problem (being CPU speed independent), but somehow with our HW, it does cause some.

So, since the application is not threaded at the point where problems arrive, I really suppose it is only the different speeds of the involved parts that cause the problems.

Best wishes,
Andreas

"Don Burn" <burn@xxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag news:u60H3BlHJHA.3868@xxxxxxxxxxxxxxxxxxxxxxx
Even if you can do this, if the driver is misbehaving on multicore systems then it is likely to be an inherent fault in the driver that can show up on single core cpu's but not as often. I strongly urge you to take a good look at the problems, and fix them rather than customize things for multicore. The odds are special casing things will come back to haunt you,


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply





"Andreas Reiff" <haenschen.klein2@xxxxxxx> wrote in message news:6juvs0F54veuU1@xxxxxxxxxxxxxxxx
Hey!

I have for the first time evaluated a driver on a multicore CPU, and the driver does not behave the way I expect it to behave.

So I try to write some workarounds for this case.

The CPU is a) faster and b) dualcore.

Since we only use 3 different CPUs all of which could be identified by their speed, this would be sufficient.

Do you have any idea on how and in which routine to query this? OS is Windows XP.

Best wishes,
Andreas




.



Relevant Pages

  • Re: AMD patent about inverse hyperthreading
    ... Both George and Tony have pointed out that CPU driver exist and quite ... common installation, nor feasibility. ... try benchmarking 4S NUMA systems using Windows). ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: getting CPU speed and/or type from within a driver?
    ... there needs to be a zeroed out entry at the end of the array, so you need to declare the array as number of elements needed+1 and make zero out the whole array first. ... // find out CPU speed ... Also, while googling, I found this info from the errata of the "Programming the Microsoft Windows Driver Model" book: ... So, since the application is not threaded at the point where problems arrive, I really suppose it is only the different speeds of the involved parts that cause the problems. ...
    (microsoft.public.development.device.drivers)
  • Re: PGR 3 Question and observation
    ... > When you are in a race the CPU cars will always smack into you causing you ... > find it hard to believe that a race driver would willing smash into you at ... > high speeds to gain an advantage for not only would you be in trouble but at ... to be hit be a CPU driver who seems to be just following his line. ...
    (alt.games.video.xbox)
  • Re: getting CPU speed and/or type from within a driver?
    ... Now the problem is how to access the registry.. ... // find out CPU speed ... WDM driver would like to call it." ... I really suppose it is only the different speeds of the involved ...
    (microsoft.public.development.device.drivers)
  • Re: getting CPU speed and/or type from within a driver?
    ... It seems now that this time is different depending on CPU/board (each CPU ... I really suppose it is only the different speeds of the involved ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ...
    (microsoft.public.development.device.drivers)