Author Topic: HLT driver  (Read 8872 times)

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
HLT driver
« on: 2011.09.19, 00:42:52 »
I wrote a small driver to call HLT as I have never gotten the 14.104b
patched kernel to work with extrahlt setting on my systems.  It works
similar to the windows System Idle Process in that when anything else
is not using the CPU this is so CPU meters will show pegged.  The 100% CPU is a
result of what I described as the Windows "System Idle Process".   
In Windows if you check the processes there is a "System Idle Process" that runs
at 100% when nothing else is using the CPU.   That is what is happening with idlehlt.exe. 
It runs in a tight loop to call the HLT.  It runs at Idle Priority and 0 delta so
anything else that needs CPU will get it.  In order for the CPU meter
to be meaningful while running idlehlt would require deleting the CPU
usage of idlehlt from the total CPU usage.
Because of the CPU usage the throttling does not work as it sees the CPU always in use. 
It does not keep my system as cool during idle as the throttling does but keeps my
system cooler during usage and does not have the sluggishness I see when first
starting to try to move my mouse when the system is throttled (if using SNAP this is probably not
an issue with mouse hardware acceleration but with Panorama I have the
mouse jumping all over the place for a second or two until the CPUs
jump back out of throttle). 
Anyone that wants to give it a shot, the driver is in netlabs incoming
as hltdriver.zip.
I recommend turning off throttling though it is not strictly necessary
but no sense in having it running.
Add idlehlt.sys as a device driver in config.sys, reboot, and run
idlehlt.exe.
I am not a device driver programmer, I used the helloworld drive as a
template.  It seems to be working well on my system but could easily
blow a system up so fair warning but I am interested in seeing how
well the concept works overall.
Andy

melf

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 606
    • View Profile
Re: HLT driver
« Reply #1 on: 2011.09.19, 03:55:27 »
Hi Andy,
I've tried your driver on my T43p. Works fine! My temp is about 60 C when doing nothing and 70 C running a wmv-movie in fullscreen and in the same time surfing on the net extensively. That is very good!
/Mikael

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: HLT driver
« Reply #2 on: 2011.09.19, 22:40:43 »
There is a new build up... there was a piece of the code that I had wrong such that I don't understand why it was doing anything at all and I made another small change to the executable to hopefully do less work.  There are now two executables, on the T43p the idlehlt.exe should be fine and maybe preferable.  The idlehlt-af.exe is a test to see if trying to bind to each processor of a multiprocessor system before calling the HLT helps further.

DougB

  • Sr. Member
  • ****
  • Posts: 407
    • View Profile
Re: HLT driver
« Reply #3 on: 2011.09.20, 03:19:55 »
I don't really notice any difference in operation (that is good), but the system does seem to be running cooler than without the idlehlt-af.exe program.

I am running it on an Asus M3A78-EM motherboard, with quad core AMD Phenom processor. The temperature widget doesn't work, so I can't quote numbers. All I can say is that the case (top back) was slightly warm to the touch before, and it is now cool.

The biggest "problem", so far, is that the e/XCenter Pulse widget is showing a higher base line activity, but you seem to know about that.

Looks promising. Thanks...

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: HLT driver
« Reply #4 on: 2011.09.20, 04:33:12 »
I made another upload, it contains another exe, idlehlt-th.exe that uses threads.  It will make the pulse widget show 99% on all cores but it potentially could run even cooler under load but I haven't had a chance to confirm that.

DougB

  • Sr. Member
  • ****
  • Posts: 407
    • View Profile
Re: HLT driver
« Reply #5 on: 2011.09.20, 22:06:03 »
Well, not long after I posted, my system hung solid. The mouse wouldn't move, nothing was being updated on the screen, and the only way out was the reset button (short of forcing a power off). There was nothing unusual happening, and I really had no reason to suspect the HLT driver, other than it was new, and I haven't had that sort of hang for a long time. A couple of hours later, the same thing happened, so I removed the driver from CONFIG.SYS, and rebooted.

Now that I got around to reporting it, I see that you have another update, so I am trying that. So far (after a few minutes), it seems to be okay (other than the 99% usage). I also installed it on my Lenovo ThinkPad T510. The temperature widget works on it, and it runs at about 61C to 65C, when no power control is used. It seems to be staying at 60C to 61C now, so it seems that there is little, if any, improvement.

More later...

DougB

  • Sr. Member
  • ****
  • Posts: 407
    • View Profile
Re: HLT driver
« Reply #6 on: 2011.09.21, 05:34:43 »
Well, on the M3A78-EM, idlehlt-th.exe didn't fix the hang, but it changed it a little. The system is no longer hung solid, the mouse still moves, and I was able to do CAD, twice, to get it to reboot. CADH did not pop up. This has not happened when I am not running idlehlt.

Since the T510 was running at a temperature that indicated that idlehlt-th.exe wasn't doing much, I took it out again, and put my throttling program back in (too bad that powerman.exe doesn't work with ACPI 3.19). It now runs at 48C.

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: HLT driver
« Reply #7 on: 2011.09.21, 05:59:53 »
On the T510 do you have the hyperthreading on?  On a T410 after turning on hyperthreading I had unexpected results today, though I haven't had a hang as yet.  I will try to see what is happening with hyperthreading.

herwigb

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: HLT driver
« Reply #8 on: 2011.09.21, 07:54:00 »
Hello Andy,

tried your driver (latest one) on my Lenovo ThinkServer TS100 (Intel Quadcore Xeon).

Tried the idlehlt-th.exe, but CPU goes to 99% only for a few seconds every few seconds alternating through the cores...
System seems a few degrees cooler (something like ~5°, instead of 58-64!° , the cores show 54-59°). No instability so far (12 hours+)

I am BTW measuring temperature using http://hobbes.nmsu.edu/download/pub/os2/util/mboard/coretemp-0.0.1.zip, which works well for several Lenovo systems here, which work with ACPI but without temperature measuring.
Kind regards,
HerwigB.

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: HLT driver
« Reply #9 on: 2011.09.21, 15:47:40 »
Hello Andy,

tried your driver (latest one) on my Lenovo ThinkServer TS100 (Intel Quadcore Xeon).

Tried the idlehlt-th.exe, but CPU goes to 99% only for a few seconds every few seconds alternating through the cores...
System seems a few degrees cooler (something like ~5°, instead of 58-64!° , the cores show 54-59°). No instability so far (12 hours+)

I am BTW measuring temperature using http://hobbes.nmsu.edu/download/pub/os2/util/mboard/coretemp-0.0.1.zip, which works well for several Lenovo systems here, which work with ACPI but without temperature measuring.
The CPU usage alternating between cores is what I saw when I turned on HT, going from 2 to 4 on the T410.  I don't yet know if it is because of something to do with the hyperthreading or if I have something not right with more than two processors.  I hope to be able to get an idea today.

RobertM

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2034
    • View Profile
    • A.I.BuiltPC - using OS/2 Warp Server & eComStation for Custom Web and Database Solutions
Re: HLT driver
« Reply #10 on: 2011.09.21, 19:02:08 »
Hello Andy,

tried your driver (latest one) on my Lenovo ThinkServer TS100 (Intel Quadcore Xeon).

Tried the idlehlt-th.exe, but CPU goes to 99% only for a few seconds every few seconds alternating through the cores...
System seems a few degrees cooler (something like ~5°, instead of 58-64!° , the cores show 54-59°). No instability so far (12 hours+)

I am BTW measuring temperature using http://hobbes.nmsu.edu/download/pub/os2/util/mboard/coretemp-0.0.1.zip, which works well for several Lenovo systems here, which work with ACPI but without temperature measuring.
The CPU usage alternating between cores is what I saw when I turned on HT, going from 2 to 4 on the T410.  I don't yet know if it is because of something to do with the hyperthreading or if I have something not right with more than two processors.  I hope to be able to get an idea today.

It does sound like it's HT causing that. If the HLT driver is stepping through physical CPU quantity, as opposed to real and virtual cores, that may be causing it. Inotherwords, it sees four real cores on Machine X, but Machine X uses HT, meaning 8 semi-cores. The driver drops in four instances of threads, which then end up executing across 4 of the 8 virtual cores. I've also noted that OS/2 SMP has a tendency to shuffle threads to different cores/CPUs if threads<cores.

I suspect the solution is to double the number of threads running for HT based systems. I'm also a little suspicious on how OS/2 handles HT "cores" - on a few of my machines, it doesn't recognize them at all (but that's WSeB - not sure how ACPI alleviates that issue).
|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


DougB

  • Sr. Member
  • ****
  • Posts: 407
    • View Profile
Re: HLT driver
« Reply #11 on: 2011.09.21, 19:06:39 »
Quote
On the T510 do you have the hyperthreading on?

Yes, I do. I will try it with that turned off.

Hmmm. Booting is certainly slower, and I don't think that has anything to do with turning off hyperthreading. Now it seems that both processors are running at 99% (most of the time). The good news is that it is running at an acceptable 53C. I will run it that way, and see what happens.

The M3A78-EM doesn't have hyperthreading.

DougB

  • Sr. Member
  • ****
  • Posts: 407
    • View Profile
Re: HLT driver
« Reply #12 on: 2011.09.22, 00:23:00 »
Well, the T510 just hung while attempting to display the pseudo drive that EVFSGUI creates. It looks like the system is still running, in the background because the mouse will move, and Doodle's screen saver just cut in, showing the Cairo clock, which is moving around, and showing the correct time. The keyboard is blocked, and the mouse movement doesn't turn off DSS. Double CAD says it is rebooting, and that worked.

I wonder if I am getting HLT started too soon, I put a RUN= statement in CONFIG.SYS for it. I will change that to start in the STARTUP folder.

abwillis

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: HLT driver
« Reply #13 on: 2011.09.22, 05:24:01 »
I found that I made a mistake with my loop dealing with the mask for the affinity.  With one or two processors it is fine but is wrong for more processors.  I begin creating many competing threads accessing the driver.  I think that that is fixed but I need to do some testing to verify what is happening with the driver with more than two processors being serviced.

herwigb

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: HLT driver
« Reply #14 on: 2011.09.22, 08:30:49 »
Andy,
just for the records: No HT here, my Xeon has 4 real cores and I see the alternating CPU loads here.

I works just fine on my Core2Duo (2 cores, no HT) ThinkCentre, with an almost instant temperature drop by ~7°
Kind regards,
HerwigB.