Re: detecting SMP CPU

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

 



On Fri, Sep 27, 2013 at 05:04:00PM +0200, Helmut Hullen wrote:
> I want to detect the existence of an SMP CPU (multi core CPU). I've  
> tried the contents of "/proc/cpuinfo" and the output of "lscpu".
> 
> Both ways only showed the existence of both processors of my AMD CPU  
> when I run them under a kernel which was compiled with the option  
> "SMP=Y".
> 
> The "help" for this kernel option proposes to set this option only if  
> the kernel really runs on such a CPU.
> 
> Is there any way to detect a multi core CPU under a kernel which is  
> compiled with "SMP=n"?

 If you don't want to rely on kernel information than you probably
 have to use CPUID and some assembler magic to get CPU topology

 http://wiki.osdev.org/Detecting_CPU_Topology_(80x86)

 or maybe you can use CPU flags from /proc/cpuinfo (I guess the flags 
 does not depend on SMP=y/n.

 It's probably better to ask at lkml :-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux