[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to detect the number of processors ?



Hello,

> sorry, I forgot to tell that `/proc/cpuinfo'
> shows up _two_ processors (when the kernel is a SMP one).
> 
> Furthermore,
> the concerned black box is a very old one:
> before september 2003 (kernel 2.4.22).
> 
> According to `/proc/cpuinfo', there are two
> 
>  Intel(R) Pentium(R) 4 CPU 3.20GHz (model name)
> 
> with `stepping' 9.

Maybe it's not present in the 2.4 kernels, but there is now a physical
id line in /proc/cpuinfo. If your 2 processors have the same physical
id, it's a dual core or a P4 HT (Hyperthreading).
I think it's probably a P4 HT. To be sure check the presence of the flag
"ht".

> As I may need a lot of CPU time, I would like to know
> if it makes sense to install a SMP kernel on this black
> box (and its shelf brothers):
> who must I try ?

If this is a P4 HT, take a look at this page :
http://www.ibm.com/developerworks/linux/library/l-htl/
If it's a dual core yes you should install a SMP kernel to take
advantage of the 2 cores.


> Can a SMP kernel be confused by a one CPU computer
> (and announce two CPU instead of one).

I don't think the kernel could show 2 CPUs if there is only one, as each
CPU are initialized one after another.

-- 
regards,
strawks




Reply to: