• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

HLT driver

Started by abwillis, 2011.09.19, 01:42:52

Previous topic - Next topic

abwillis

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

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

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

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

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

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

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

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

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

Quote from: herwigb on 2011.09.21, 08: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.
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

Quote from: abwillis on 2011.09.21, 16:47:40
Quote from: herwigb on 2011.09.21, 08: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.
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

QuoteOn 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

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

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

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.