• 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

DougB

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.

abwillis

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.

abwillis

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. 

abwillis

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.

herwigb

The new set makes my Core2Duo ThinkCentre behave very jerky, mouse and everything - unusable. I'll test on the Xeon tomorrow...
Kind regards,
HerwigB.

DougB

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.

DougB

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.

DougB

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.

abwillis

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.

DougB

Quoteit 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.

QuoteThe 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.

QuoteI 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?

QuoteThe 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.

DougB

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.

abwillis

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.

melf

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.
/Mikael

DougB

QuoteIf 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.

abwillis

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.