Does Linux support P4 Hyper threading?

ICMAN

Member
May 26, 2003
90
0
0
Does anyone know what version of linux redhat or mandrake supports hyper threading?
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
There was linux support for hyperthreading on the P4 before windows I believe. :)

All you should need to do is enable SMP & APIC support in the kernel and recompile.

You can check that everything's working with a 'cat /proc/cpuinfo' (2 cpus should be displayed).

Later.. :beer:
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
reading it as 2 CPUs and HT support are differant things, it wont much matter if you only have a single HT CPU however if you have more than one it will try and schedule multiple threads on a single CPU and leave the other(s) idle.

Yes newer versions of Linux do have HT support built in and I think Linux HT support became available at about the same time as Windows (or perhaps just a little before, when Win XP was released).

-Spy
 

xcript

Diamond Member
Apr 3, 2003
8,258
2
81
Originally posted by: spyordie007
Yes newer versions of Linux do have HT support built in and I think Linux HT support became available at about the same time as Windows (or perhaps just a little before, when Win XP was released).

-Spy

Specifically, HT support was included in the 2.4.17-pre5 (thanks to Alan Cox).

Later.. :beer:
 

sciencewhiz

Diamond Member
Jun 30, 2000
5,885
8
81
redhat has had kernel 2.4.18 or better since 7.3. Mandrake since 8.2. See distrowatch.com if you want to know for other distros.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Yes it does. Pretty cool, /proc/cpuinfo shows 4 CPUs, and the threaded app I'm working on peaks at 4 threads (instead of 2 with HT disabled). It's in since at least 2.4.18, but >= 2.4.20 is supposed to have better scheduler support. I'm going to upgrade one of my nodes to that ... maybe today ... to see how much difference it makes.
 

ICMAN

Member
May 26, 2003
90
0
0
People, thanks to you all. I must clarify some things. I know how to use linux, but I don't know much about linux in general. I just don't want to buy XP because I don't want to spend the money for Microsoft anymore. Anyway, so RedHat 9 (or what ever is latest version) supports HT, right?

And, if we have two separate programs running, isn't it the OS responsibility to throw each process on a different thread? And do the two threads share the same on-chip cache?

I'm a hardware person, I don't know much about linux or any other OS, but I know one thing... I really don't wish to buy a Microsoft product in my life again.

But, I still love to play games and all that, can I run games on linux? I know one of my friends had some kind of emulator that basically runs Windows based games, what do you know about this guys? If I still want to play games, do you think I should keep a windows on my computer? I have windows 98SE on mine. Do you think I always enable HT on the processor, and still have the choice to log to either linux or windows, without windows 98 crashing on because HT is enabled and windows 98 don't know what the hick is it?

Sorry for long post! :)

ICMAN
 

ICMAN

Member
May 26, 2003
90
0
0
Budman, I checked the website, thanks for info.

Answering myself: The lastest versions of Mandrake and RedHat support HT.

All other question in the last post I still need and answer for.

Thanks to you all,

ICMAN
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: ICMAN
People, thanks to you all. I must clarify some things. I know how to use linux, but I don't know much about linux in general. I just don't want to buy XP because I don't want to spend the money for Microsoft anymore. Anyway, so RedHat 9 (or what ever is latest version) supports HT, right?

And, if we have two separate programs running, isn't it the OS responsibility to throw each process on a different thread?

Yes ... sort of. It doesn't "throw each process on a seperate thread" A thread is sort of a light-weight process. A single process can potentially have several threads, and the OS schedules them independently so you can have different threads from the same process running on different CPUs simultaneously.

And do the two threads share the same on-chip cache?

AFAIK

I'm a hardware person, I don't know much about linux or any other OS, but I know one thing... I really don't wish to buy a Microsoft product in my life again.

:D A worthy goal!

But, I still love to play games and all that, can I run games on linux? I know one of my friends had some kind of emulator that basically runs Windows based games, what do you know about this guys? If I still want to play games, do you think I should keep a windows on my computer? I have windows 98SE on mine. Do you think I always enable HT on the processor, and still have the choice to log to either linux or windows, without windows 98 crashing on because HT is enabled and windows 98 don't know what the hick is it?

Sorry, I'm not a gamer ... somebody else can help you out on those bits.

Sorry for long post! :)

ICMAN

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
But, I still love to play games and all that, can I run games on linux? I know one of my friends had some kind of emulator that basically runs Windows based games, what do you know about this guys?

Games are hit and miss in Linux. A handfull are natively ported like Q3 and UT2K3 but the rest need WINE or WINEX (which isn't an emulator BTW) and that can be a PITA to get working and some games run like sh!t. If your friend has it working ask him to help you set it up, but you may need to keep that Win98 partition around for some games. I doubt Win98 would crash from HT being enabled, it will probably run but with only seeing 1 physical or logical CPU but I can't say before as I havn't touched Win9X in years, thankfully.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Just got RH9 (2.4.20) up on one of the nodes and tried my code on it. 9% faster, and tops out with 6 threads instead of 4. Top shows a significantly higher system load also (3.5 vs.~2.6)

:D:beer:

And FedEx brought me my Intel compilers today also :D:D
 

ICMAN

Member
May 26, 2003
90
0
0
Thanks to you all.

I will start downloading RedHat 9 now. Right now, I'm away from all of my friends. So I'll have to do this alone.

Wish me luck!

ICMAN :cool:
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Top shows a significantly higher system load also (3.5 vs.~2.6)

That load is just the number of runnable processes in the run queue, on my dual athlon mine easily gets up to 4 or 5 and the lowest it gets is 2 because I constantly run a distributed.net client.
 

Booty

Senior member
Aug 4, 2000
977
0
0
If you end up needing to keep windows for gaming, I'd assume that it'll work fine with HT enabled... my friend ran dual P3's a while back and dual-booted 2k and 98... 98 worked fine. Only used one of the CPUs, of course, but it was fine.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Nothinman
Top shows a significantly higher system load also (3.5 vs.~2.6)

That load is just the number of runnable processes in the run queue, on my dual athlon mine easily gets up to 4 or 5 and the lowest it gets is 2 because I constantly run a distributed.net client.

Ok, so does it mean anything that RH9 seems to peak runtime wise with a higher number hear? It would seem that RH9 is able to keep the queue fuller the RH8, which should be good.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Ok, so does it mean anything that RH9 seems to peak runtime wise with a higher number hear? It would seem that RH9 is able to keep the queue fuller the RH8, which should be good.

If you're using the same number of threads or processes in your application the only thing I can assume is that something extra is running in RH9 adding more to the load numbers which wouldn't be good as it would be more processes competing for runtime in the queue.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Nothinman
Ok, so does it mean anything that RH9 seems to peak runtime wise with a higher number hear? It would seem that RH9 is able to keep the queue fuller the RH8, which should be good.

If you're using the same number of threads or processes in your application the only thing I can assume is that something extra is running in RH9 adding more to the load numbers which wouldn't be good as it would be more processes competing for runtime in the queue.

But if the average number of available processes in the queue is < number of CPU on the system, doesn't this mean that some of the CPU will be work-starved? ie. if the average number of available processes is two on a 4 CPU box, if they all finish their current jobs simultaneously, two will be idle. Better to keep the queue full, then let the CPUs idle.

It's been my experience on multiprocesor boxen, that performance seems to peak when this load average is roughly equal to the numbver of CPUs on the system ... more then that, and it starts bogging down, less then that, and you can still squeeze some more out of it.