LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   smp kernel (https://www.linuxquestions.org/questions/linux-newbie-8/smp-kernel-395465/)

Kamikazee 12-21-2005 08:32 PM

smp kernel
 
Ive just bought a 3ghz p4 with HT. I havnt installed it yet..

Im running the 2.6.12 kernel (compiled from source from kernel.org), do i have to recompile to get smp? what do i have to do to use both logical processors?

jbetten 12-21-2005 08:45 PM

Well... the first thing you have to do is enable hyperthreading in the BIOS, if it isn't already. Then you can try booting your kernel.

If SMP isn't enabled then you will only be using one processor, you can check by looking in /proc/cpuinfo. Then to get the second processor working you will need to recompile your kernel with SMP and preferably SMT scheduling. Then just reboot into the new kernel... it is that easy.

KimVette 12-21-2005 09:04 PM

Here's what you do:

1. make menuconfig
2. go to Processor Type and Features -> Processor Family -> select (X) Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon
3. Go to Symmetric multi-processing support -> and enable it
4. Enable SMT (Hyperthreading) scheduler support (NEW) (right below flag for #3)
5. Go to the preemption mode, set it for low-latency for preemptive rather than cooperative multitasking

Compile, install, etc.

When booting to the new kernel, check /proc/cpuinfo - two processors should be identified if the logical processors were enumerated. You can go one further and check the flags to make sure that it's actually hyperthreading-aware for optimal performance:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dt s acpi mmx fxsr sse sse2 ss ht tm pbe pni monitor ds_cpl cid xtpr

Look for the 'ht' flag on each (logical) processor.

Incidentally, I went through a heck of a time getting hyperthreading recognized the first time I compiled the kernel on a hyperthreading box. I went through the SMP options and recompiled several times and each time it was enumerating the logical CPUs as two physical CPUs (just like the out of the box kernel did), which can lead to performance degradation in some(many) cases. Finally I noticed the problem: I had set the CPU type to( ) 586/K5/5x86/6x86/6x86MX, not realizing that there were additional processor options. Just giving you the heads up on that so you don't make the same mistake.

Kamikazee 12-21-2005 10:11 PM

thanks ... will do.


All times are GMT -5. The time now is 03:37 AM.