OS2World OLD-STATIC-BACKUP Forum

OS/2 - Technical => Hardware => Topic started by: abwillis on 2011.09.19, 00:42:52

Title: HLT driver
Post by: abwillis 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
Title: Re: HLT driver
Post by: melf 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!
Title: Re: HLT driver
Post by: abwillis 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.
Title: Re: HLT driver
Post by: DougB 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...
Title: Re: HLT driver
Post by: abwillis 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.
Title: Re: HLT driver
Post by: DougB 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...
Title: Re: HLT driver
Post by: DougB 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.
Title: Re: HLT driver
Post by: abwillis 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.
Title: Re: HLT driver
Post by: herwigb 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 (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.
Title: Re: HLT driver
Post by: abwillis 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 (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.
Title: Re: HLT driver
Post by: RobertM 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 (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).
Title: Re: HLT driver
Post by: DougB 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.
Title: Re: HLT driver
Post by: DougB 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.
Title: Re: HLT driver
Post by: abwillis 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.
Title: Re: HLT driver
Post by: herwigb 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°
Title: Re: HLT driver
Post by: DougB on 2011.09.22, 18:22:02
Using the TH version, I find that I am getting a hang, on both of my systems, after about 2 hours of usage (plus, or minus). I am also seeing very jerky operation, especially when trying to run WinXP in Virtual PC. I also notice, that disk operation seems to be extremely slow.

The T510 (Dual core, with HT off) shows these problems more than the quad core AMD Phenom does. The T510 is using the new AHCI disk driver, while the quad core is using the Danis driver.
Title: Re: HLT driver
Post by: abwillis on 2011.09.23, 05:21:06
The hangs are caused by the bad thread creation I mentioned... creates 15 threads for four processors instead of 4 and eventually they collide.  I have a new version that I should have uploaded tomorrow that fixes the thread creation.  I am still checking a race condition that will setup the threads wrong but at least there are not nine extra threads any more and normally it is working correctly.  The new af version is runs my two processors at 50% on each processor but on the T410 it is running without using much CPU (much less than I would expect).  My older dual core is seeing better results than I get from the T410 so far.
Title: Re: HLT driver
Post by: abwillis on 2011.09.23, 23:17:43
I have uploaded a new version with updated af and th modules.  This one should be fine with systems up to 32 processors (it should be ok on up to 64 but at this point I only explicitly call HLT on up to 32).   The TH version currently has some output to make sure it is loading properly... you should see the return code followed by the processor.  RC should equal zero and the affinity should be 1, then 10, then 100, then 1000, etc. where the numbers are a mask for the processor such that 1 is one, 10 is 2, 100 is three, and 1000 is four.  If you get to rc = lines in a row then something went wrong.  I haven't had an issue yet with this new method but I have left the output to make sure on other hardware. 
Title: Re: HLT driver
Post by: abwillis on 2011.09.24, 00:14:09
A bit after the last post my T410 ended up locking up.  Presumably it is from the HLT driver.  This machine with two processors never has a problem, the T410 was running fine and then locked, locked again after a reboot fairly quickly.  I would be interested in finding if it locks a system with 4 real processors at this point or if it is related to the HyperThreading.  The af version does not seem to use much CPU on my T410 as compared to previous versions.
Title: Re: HLT driver
Post by: herwigb on 2011.09.24, 18:26:55
The new set makes my Core2Duo ThinkCentre behave very jerky, mouse and everything - unusable. I'll test on the Xeon tomorrow...
Title: Re: HLT driver
Post by: DougB on 2011.09.24, 18:35:15
I tried the TH version on my quad core AMD Phenom processor. I see the very jerky operation, and disk operation is extremely slow (Danis driver). The odd thing was that I saw the RC=0, 4 times, but the number jumped from 10 to 1000. There was no 1, or 100.
Title: Re: HLT driver
Post by: DougB on 2011.09.24, 20:01:51
I tried the TH version on my T510, with no hyperthreading. It is s little bit jerky, and disk I/O is extremely slow.

Then, I tried the AF version, on the T510, and it is much better. It also keeps the processor just as cool as the TH version does. The load seems to stay at about 60% for both processors.

Then, I tried the AF version on the Asus M3A78-EM, with quad core processor. I can't tell, for sure, if the temperature is lower, but it seems to work okay otherwise. The load seems to spread evenly across the processors at about 50% usage (plus, and minus).

Using the TH version on my quad core, I am seeing:
Set thread's affinity rc = 0
Set thread's affinity rc = 0
Set thread's affinity affinity[0] = 10
Set thread's affinity affinity[0] = 10
Set thread's affinity rc = 0
Set thread's affinity affinity[0] = 100
Set thread's affinity rc = 0
Set thread's affinity affinity[0] = 1000

Today, 100 showed up, but 1 is not there, while 10 is there twice. Possibly a timing thing?

On the T510, I see:
Set thread's affinity rc = 0
Set thread's affinity affinity[0] = 1
Set thread's affinity rc = 0
Set thread's affinity affinity[0] = 10

which seems to be what you describe.

I am going to try the AF version on both machines, to see what happens.
Title: Re: HLT driver
Post by: DougB on 2011.09.24, 21:37:35
Well, the M3A78-EM hung solid. No mouse movement, and no screen updates. I was using Pronews to download new items. After using the reset button to restart it, Pronews was royally screwed up. I restored it from last nights backup. It seems that the TH version does not freeze the whole machine when it hangs the desktop, so background operations seem to finish.

Hopefully, you can find the cause of the hangs.
Title: Re: HLT driver
Post by: abwillis on 2011.09.25, 01:08:07
DougB, it is just the TH version that hangs?  I haven't seen the AF version do so but just want to make sure.
The threads version seems to hang on systems with more than two processors regardless of whether they are hyperthreads or not.  The reason for the duplicate affinity calls is indeed due to a timing issue, when I create the thread I have to tell it which processor to create it for, I had thought I had finally got that tackled but apparently not.  The hangs I had originally thought were caused by opening 16 threads competing for 4 processors but apparently even four threads is too much calling against the driver. 
Herwigb, do you see the jerky operation only with the TH version or also with the AF version?   
Myself, I see good results on my Duo system but the T410 with hyperthreading I am not seeing the same kind of temperature drops on it... It is lower than with nothing but higher than the powerman achieves which on this Duo system they are about the same at idle and slightly lower when running under load. 
I am thinking that to fix the hangs of the TH version will require serializing access to the driver, which then would be not really any difference than using the AF version. 
The next version of acpi may render this driver moot but I am going to keep working on it as a learning experience if nothing else.
Title: Re: HLT driver
Post by: DougB on 2011.09.25, 03:41:36
Quote
it is just the TH version that hangs?

No, the AF version hangs too. I haven't tried the original IDLEHLT for a while, but it hung too, when I tried it. The big difference is that only the TH version will allow the system to be rebooted by CAD (twice), and the mouse continues to move. The others are hung solid, with the only way out to either force a power off, or use the reset button.

Quote
The threads version seems to hang on systems with more than two processors regardless of whether they are hyperthreads or not

I have had it hang on my T510, which is two processors, currently with HT turned off.

Quote
I am thinking that to fix the hangs of the TH version will require serializing access to the driver,

I don't think that is where the problem lies (but I am only guessing). I am more inclined to think that the system ends up halted, but nothing ever starts it again. Every time I have seen the hang, with the TH driver, it appears that only the desktop is hung, and other things continue, in the background. The IDLEHLT, and IDLEHLT-AF, programs result in a hard hang, where nothing works (except a forced power off, or the reset key). Is that, perhaps, what the lines:
#####################################################################
; How many tics CPU (1...n) will be wait in HLT
; default - tics in 500nsec interval
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HLTTime = 700
#####################################################################
in C:\MPTN\ETC\acpid.cfg are all about?

Quote
The next version of acpi may render this driver moot

That would be great, but they have a LOT of other things that are far more important to fix, before worrying about running cool.

A couple of comments about powerman. First, it only works with ACPI v 3.18 (perhaps earlier - I never tried that). It doesn't work with ACPI v 3.19 (which I need on the T510 to prevent a 4 minute pause at SCREEN01.SYS, during boot). Second, it can leave a system throttled at shutdown. On my M3A78-EM, with quad core AMD Phenom processor, that can prevent a programmed reboot (or even a CAD reboot). The system is properly shut down, but the reboot never happens. Even using the reset switch will not always make it go again. Sometimes, I need to "pull the plug" for a minute, to make it go. I don't think this is really a problem with powerman, or ACPI. It seems to be something in the BIOS support, but it seems that powerman should throttle up, before it closes.
Title: Re: HLT driver
Post by: DougB on 2011.09.25, 05:39:24
I found another "problem" for you to fix. I have an IBM ThinkPad T43 (1871-W8M). I tried HLTdriver on it. None of the three EXE files will start. I suspect that that is because that machine has only CPU 1, and not CPU 0. I run it using ACPI.PSD /SMP /APIC because that seems to work best, even though it only has one processor.
Title: Re: HLT driver
Post by: abwillis on 2011.09.25, 06:12:48
If you have the SMP kernel then any of them should probably work, if the uni kernel possibly only the idle.exe would work and with the W4 then certainly only the idle.exe would work.  There is a report of it working on a T43P and they were using the idle.exe.
Title: Re: HLT driver
Post by: melf on 2011.09.25, 15:27:19
I use it with my T43p (2669-83G). idlehlt.exe  and the ah works fine. th doesn't work. I use the same acpi parameters as Doug.
Title: Re: HLT driver
Post by: DougB on 2011.09.25, 19:09:19
Quote
If you have the SMP kernel then any of them should probably work,

I use the SMP kernel with everything, except a virtual PC warp4 system. The IDLEHLT programs all terminate immediately on the T43, but the TH version does tell me "Closing handle", before closing. I do know, that the single CPU identifies itself as CPU 1, while most systems identify one CPU as CPU 0. I suspect that you attempt to attach to CPU 0, find that it doesn't exist, and give up. You also need to try CPU 1.
Title: Re: HLT driver
Post by: abwillis on 2011.09.26, 04:51:58
The idle.exe doesn't do anything with the CPUs as far as affinity.  The affinity calls themselves start with CPU 1 so there must be something else causing the problem.
Title: Re: HLT driver
Post by: herwigb on 2011.09.26, 08:46:41
Andy,
Quote
Herwigb, do you see the jerky operation only with the TH version or also with the AF version?   
I see the jerky operation with both of them - being a curious guys, I tried the old driver with the new .exes et voila jerky operation is gone....
Title: Re: HLT driver
Post by: abwillis on 2011.09.26, 16:47:13
Do you have the zip that the driver you don't have problems with the jerkiness?  The driver hasn't had any real changes that I can think of since the initial post... If you have the zip it will have the source and I'd like to verify anything that could have changed since then to the driver itself.  In particular, if you open the ioctl.c, how many times was hlt called... the only thing I have played with was the number of times hlt was called per driver call to see if calling it more than once was more efficient than just one call.  I haven't seen a difference here but whichever way is showing better there will be the way I look towards.
Title: Re: HLT driver
Post by: abwillis on 2011.09.27, 05:03:48
Is anyone experiencing the hangups using os2ahci instead of danis506?  The machine that I have not problems at all on is using os2ahci but the T410 is running danis506... I am wondering if maybe I am conflicting with Danis506 somehow.  On the T410 I am able to see the slow DiskIO but not on this machine with the os2ahci which is another reason I wonder if I am conflicting there.  I have determined why the later driver showed it but the earlier one did not... I was seeing if I could call more HLT per driver call to see if it would reduce overhead from the loop in an effort to lessen CPU usage.  It didn't help but as I did not see any change on this system which is the one I use I didn't think to restore it to just one call before uploading it.  I have a test running on the T410, if it is still running in the morning I will upload a new version tomorrow.
Title: Re: HLT driver
Post by: DougB on 2011.09.27, 05:27:55
Quote
Is anyone experiencing the hangups using os2ahci instead of danis506?

Yes, I use OS2AHCI on the T510, and it has hung a couple of times.
Title: Re: HLT driver
Post by: herwigb on 2011.09.27, 07:50:39
Andy,
yes, I have, I will provide a link to the zip file later today.
Title: Re: HLT driver
Post by: abwillis on 2011.09.27, 17:57:12
OK, so it is not HT, nor os2ahci, nor the number of threads (I built a test app that was opening 20 at a time here in an attempt to lower processor usage, I did get it down to ~75% while keeping the same temperature but that doesn't seem to be much of an advantage).  The next difference that I thought of is the kernel in use.  On this machine that has no problems I have 14.104a in use.  Is anyone seeing hangs with 14.104a?  The T410 had 14.105 and I don't know about 14.104b if it could potentially conflict.  Anyhow, just looking for data while I am running a test again on the T410 with 14.104a kernel now.
Title: Re: HLT driver
Post by: DougB on 2011.09.27, 18:09:52
I got the T43 to run with IDLEHLT and IDLEHLT-AF, but IDLEHLT-TH just terminates with the message "Closing handle". I am not sure why ir works today, and not before. Perhaps I forgot to reboot to load the driver. It does lower the temperature.

I have seen kernel 14.105 hang on both the T510, and the quad core. I have not seen it hang with 14.104a, but I rarely use that any more, so that doesn't mean much. I will try it.

Title: Re: HLT driver
Post by: abwillis on 2011.09.27, 19:13:37
Ran the 14.104a kernel on the T410 for an hour with no issues... closed idlehlt-th and restarted it and in half an hour it had hung.  Here the TH version always hangs solid requiring power off when it does hang. 
Title: Re: HLT driver
Post by: DougB on 2011.09.28, 00:21:01
I am running the 14.104a kernel on my quad core. I tried the TH version, and it ran, slowly, and very jerky, for about 45 minutes. I never got more than about 30 minutes with the 14.105 kernel, before it hung. Then, I shut down the TH version, and tried the original version. It too was very jerky, so I shut it down after about 5 minutes, and started the AF version. That still causes a slowdown, and I can't tell, for sure, what the temperature is (seems to be cooler), but it is still running a few hours later.

I also started the AF version on my T510. It is also still running a few hours later, but it hasn't been doing anything except run the Doodle Screen Saver Cairo clock.

In both cases, it seems that the machine is far more likely to hang when using the 14.105 kernel (or Murphy is playing games again). It also seems that the AF version is much faster than the other versions, and that makes it much smoother, but I can still detect some jerky mouse movement. The CPU usage, on the quad core, seems to ride at about 50%, when idle. The T510 (no HT) seems to idle at about 60% usage. Both using the AF version.

The "slow" operation seems to have something to do with disk operation. (Danis on the quad core, and OS2AHCI on the T510). When I watch the disk led, I see about 20% duty cycle with operations where I expect to see 100% disk activity. If I get a program loaded, that doesn't use much disk, it seems to run reasonably fast.

I am not sure what to make of all that...
Title: Re: HLT driver
Post by: abwillis on 2011.09.28, 01:26:56
I have uploaded a new build... the idlehlt.sys in it should hopefully alleviate some of the DiskIO issues as it is back to the way it was initially.  There are some new exe files, the idlehlt-tth.exe I have introduced a slight timing variance that may keep it from hanging when used with the 14.104a kernel but it could just be that it hasn't hung yet.  The idlehlt-mth.exe and idlehlt-mth1.exe spawn more threads while trying to call DosSleep to show less CPU usage but they only got it down to 75% so may not be that interesting and on the T410 doesn't appear to actually be doing anything worthwhile.
Title: Re: HLT driver
Post by: DougB on 2011.09.28, 04:05:24
Quote
I have uploaded a new build

On the Asus M3A78-EM quad core:This one is working much better. A quick experiment with the various versions showed that the jerky movement, and the slow disk I/O, are no more. Further observations showed that using the MTH version gives me the lowest usage on the quad core system. At idle, each processor seems to stay between 5% and 10%. MTH1 seems to stay between 10% and 15%. As noted, the temperature widget doesn't work, so it is only an impression that the temperature stays lower than without your driver. I ran the 14.104a kernel, and AF, for most of today, with no hangs, but I have switched back to the 14.105 kernel for now. The program startup now shows what I expect to see (based on what you said earlier).

On the T510: Again, it is working much better. The jerky mouse, and slow I/O, seem to be fixed. Here too, I have gone back to the 14.105 kernel, and I am using the MTH version, which seems to keep the  activity meter in the 65% to 70% range. The uncontrolled temperature is about 61C, and with your driver, it is staying at about 52C. This is good.

Overall, both systems seem to be very responsive, yet they run cooler (subjective on the desktop). Now, if they will continue to run...

Title: Re: HLT driver
Post by: DougB on 2011.09.28, 04:39:51
Well, the Asus M3A78-EM quad core hung after about 45 minutes. It was a hard hang, that required the reset key. Then, it hung hard again, just after the desktop appeared (before loading idlehlt). Using MTH version.

I will try the TTH version, with the 14.105 kernel. The processor usage is back up to the 90% to 99% range, and response is definitely a little slower, but not too bad.
Title: Re: HLT driver
Post by: DougB on 2011.09.28, 05:34:21
TTH hung solid when I tried to fetch updates to the news groups, using Pronews. Pronews was royally screwed again, and I had to restore it from my backup.

I will try more things tomorrow...
Title: Re: HLT driver
Post by: abwillis on 2011.09.28, 18:23:39
I left the T410 running with the TTH version last night, came in to find it hung solid; that with the 14.104a kernel. 
So it does not seem to be a difference in kernel, acpi, os2achi vs danis506, USB drivers (had the usbhcd13 drivers on this machine that does not exhibit problems and IBM drivers on the T410 and have changed those out). 
One theory that may not actually hold water but I am trying to test... the T410 is a newer machine than this one.  I have not been able to get a definitive answer as to how C states past C1 (HLT) get set.  In one Intel document it seemed that it may be done by the hardware, so I wonder if the C1 state goes long enough if it moves to a deeper state (doesn't seem right that it would do that and not come back out on its own).  To that end, I have changed the BIOS on the T410 from Automatic in the power setting to Maximum and running it now to see if maybe the newer system is trying to be more aggressive in power saving but then I don't have a way to pull it back out.
It has run an hour so far but I have gotten that far before.
Title: Re: HLT driver
Post by: abwillis on 2011.09.28, 23:53:50
Since setting the Power settings in BIOS to Maximum instead of Automatic it has been running for several hours now.  I let it run an hour, stopped idlehlt-th and restarted it, let it go a couple of hours and restarted it again and it has now been going for a couple more hours.  I'll let it run overnight but its been that if it has run for over an hour and I restarted it that it would hang 30-45 min later.  I will have to double check but I think the Z61 has Power setting as Automatic but being older may not be as aggressive.  That at least is my best guess at this point.  As I have not found how to get the machine to go into a deeper sleep state than C1, I am not sure what it takes to get it out if that is indeed what is happening.
Title: Re: HLT driver
Post by: abwillis on 2011.09.29, 17:08:43
Came in and found that 3 1/2 hours after I had left it had hung again.
Title: Re: HLT driver
Post by: herwigb on 2011.10.10, 10:24:18
Found that running the .exe (does not matter which one) massively interferes with USB communication to my scanner....
Title: Re: HLT driver
Post by: abwillis on 2011.10.10, 20:10:52
I have seen the same thing, I think, when copying large amounts of data to a USB drive. 
Title: Re: HLT driver
Post by: abwillis on 2011.10.27, 19:25:40
I uploaded a new version... it still hangs my T410 but it went 12 hrs before it did (not had a chance to test it much more than that).  There is a slight chance it may help with the USB issue (not a strong one but possible).  The change this time is to idlehlt.sys.
Title: Re: HLT driver
Post by: miturbide on 2011.10.28, 18:37:18
Hi

I want to test out this driver on a Thinkpad R51 and other machine, but I have problems with the Reactor Widget. It doesn't show a real temperature. I had read the readme file, but I do know what I'm missing to make the widget work.

Any tip, pointer, link will be appreciated.
Title: Re: HLT driver
Post by: DougB on 2011.10.28, 20:22:22
Quote
I have problems with the Reactor Widget. It doesn't show a real temperature

The Reactor widget requires support from ACPI. ACPI is far from complete on many machines, and one of the more common deficiencies is that the Reactor widget can't get the temperature.

I assume that you have ACPI running, so you should be able to use the Thermal.exe program to see if it works, or not.

Quote
I uploaded a new version

I ran it for a couple of hours, with no hang, but it was very slow, and jerky, when I tried idlehlt-th.exe. It was also running all four processors at 99%. idlehlt-af.exe works much better (so far), and the processors are staying at about 5% usage. Since this machine doesn't work with the Reactor widget, it is difficult to tell, for sure, that it runs cooler, but my impression is that it does.
Title: Re: HLT driver
Post by: DougB on 2011.10.29, 19:11:38
I had another hang. It seems that if I start Pronews/2, then tell it to refresh all of the news groups, it just barely gets started, and hangs. This seems to be consistent (as in every time). After restarting, the news groups are messed up. I didn't try to figure out why, I just restored the whole Pronews directory from my backup. Another thing that happened, was that my router appeared to be hung after reboot. I tried it with another system, and it wouldn't work with the router either. All was well after rebooting the router.

This seems to indicate that the problem may lie in the TCP/IP area, but others are seeing problems with USB. That puts the problem into the I/O area somewhere. Is there, perhaps, a "back door" that I/O can use, that HLT is not aware of?
Title: Re: HLT driver
Post by: abwillis on 2011.10.30, 02:30:47
There is a possibility of something IO related being an issue...  that being said the work of the hlt driver is:
asm{
hlt}
or the latest I did:
asm{
hlt
sti}
the sti to explicitly turn on IRQs in case the USB and hangs were related to IRQs somehow being disabled by the HLT.  The ones that had the really bad slowdowns had several hlt calls instead of just one. 
I don't have Pronews/2 on the T410, I do on this machine and have no problems with it but then it doesn't hang anyhow... I'll see if I can get time to put Pronews/2 on the T410.
Title: Re: HLT driver
Post by: DougB on 2011.10.30, 20:10:36
Quote
asm{
hlt}
or the latest I did:
asm{
hlt
sti}

Hmmm. I am not really a programmer, but I do know how computers work. It seems to me that enabling interrupts AFTER you halt the machine, is really not going to help, since the STI would not be executed until after the HLT is ended. If interrupts are, somehow, disabled, the HLT would never end (which seems to be what we are seeing), so the STI would never execute. Then, there is the problem where enabling interrupts might mess up whatever disabled them. Is there some way to determine if interrupts are disabled, and if so, don't use HLT?
Title: Re: HLT driver
Post by: abwillis on 2011.10.31, 00:58:38
If it doesn't help the USB then the STI should definitely be removed and might ought to be removed anyhow in case something else is needing to call a CLI (stops interrupts).  I don't think being after the HLT though is an issue because the HLT lasts about 1ms from what I can tell, that is why I am having to put the tight loop calling the thing so often causing the CPU meter to read 100%.  Even putting a DosSleep(1) which stops the CPU meter from being pegged stops any effectiveness from calling the HLT.  My guess is that it is not an IRQ issue causing the hang or I think the STI would have been able to prevent it.