detecting SMP CPU
Hallo, util-linux,
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"?
Please excuse my gerlish.
Viele Gruesse!
Helmut
Karel Zak
maintainerQuoted 7 lines · Helmut Hullen
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".
Quoted 5 lines
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
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Hallo, Karel,
Du meintest am 07.11.13:
Quoted 2 lines
Quoted 2 lines
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".
[...]
Quoted 6 lines
Quoted 2 lines
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
Quoted 6 lines
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 :-)
Thank you - i'm still (re-)searching.
Viele Gruesse!
Helmut