Central-Processing-Unit

具有相同 id 的處理器,為什麼?

  • June 4, 2011

這是輸出cat /proc/cpuinfo

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 2
model name  : Quad-Core AMD Opteron(tm) Processor 2350 HE
stepping    : 3
cpu MHz     : 1994.998
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 0
cpu cores   : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
bogomips    : 4000.86
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 2
model name  : Quad-Core AMD Opteron(tm) Processor 2350 HE
stepping    : 3
cpu MHz     : 1994.998
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 1
cpu cores   : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
bogomips    : 4000.86
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 2
model name  : Quad-Core AMD Opteron(tm) Processor 2350 HE
stepping    : 3
cpu MHz     : 1994.998
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 1
cpu cores   : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
bogomips    : 4000.86
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 16
model       : 2
model name  : Quad-Core AMD Opteron(tm) Processor 2350 HE
stepping    : 3
cpu MHz     : 1994.998
cache size  : 512 KB
physical id : 0
siblings    : 1
core id     : 1
cpu cores   : 1
fpu     : yes
fpu_exception   : yes
cpuid level : 5
wp      : yes
flags       : fpu de tsc msr pae cx8 apic cmov pat clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow constant_tsc rep_good pni cx16 popcnt lahf_lm cmp_legacy extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
bogomips    : 4000.86
TLB size    : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

為什麼4處理器都帶有 id 0( processor : 0)?

您的核心可能配置為不支持 SMP。請參閱proc.c 的原始碼

       unsigned int cpu = 0;
...
#ifdef CONFIG_SMP
       cpu = c->cpu_index;
#endif

然後在 中的欄位cpu的輸出中使用此變數。processor``/proc/cpuinfo

引用自:https://serverfault.com/questions/276960