You are not logged in.
Pages: 1
The pentium4 processors have something on them called "hyper-threading", which allows them to behave as if they were a dual-core CPU. What compiler flag or flags would I use to allow a program to take advantage of hyper-threading? Or would I have to compile an SMP kernel?
Offline
You need an SMP kernel
cat /proc/cpuinfo | grep processor
processor : 0
processor : 1Treated as 2 processors.
Offline
Okay, so how do I compile an SMP kernel? Or is there one available on one of the repositories?
Offline
There's a thousand howto's just a googling away ![]()
Offline
Offline
Arch default kernels are SMP-enabled.
Offline
carlocci /proc $ uname -a
Linux ecchelo 2.6.24-ARCH #1 [b]SMP[/b] PREEMPT Sun Feb 10 15:21:33 UTC 2008 i686 AMD Athlon(tm) XP 2400+ AuthenticAMD GNU/Linuxeven though you could be writing anything on it, I think we can trust the pkg mantainer ![]()
Offline
Arch default kernels are SMP-enabled.
Okay then, I guess that takes me back to my original question: is there a compiler flag that will cause a program to be built to take advantage of multiple processors or hyper-threading?
Offline
lucke wrote:Arch default kernels are SMP-enabled.
Okay then, I guess that takes me back to my original question: is there a compiler flag that will cause a program to be built to take advantage of multiple processors or hyper-threading?
Again, programs are generally compiled this way, anyway.
You're going to need to be more specific. Assuming, since you put it in the thread title, that you want wine programs to be SMP-enabled, they already are. In fact, windows programs that break when you use multiple CPUs under windows will also break when you use them under wine, and you'll need to use something like schedtool to allow wine the use of only one cpu.
Cthulhu For President!
Offline
No, the program has to be written to use multiple *threads*.
Offline
No, the program has to be written to use multiple *threads*.
He asked if there was a compiler flag. If there is, it's compiled this way.
EDIT: Besides, threads aren't the only model. Message passing/Sockets/RPC between processes uses multiple cores/hyperthreaded CPUs quite well.
Last edited by buttons (2008-02-21 21:03:56)
Cthulhu For President!
Offline
Pages: 1