LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   confused in processor number in linux (https://www.linuxquestions.org/questions/linux-software-2/confused-in-processor-number-in-linux-833889/)

duyuyang 09-22-2010 07:42 PM

confused in processor number in linux
 
My box is using intel i7 with hyperthreading enabled. So it has 8 logical processors. I am confused about their numbering.

I checked the /proc/cpuinfo file, the processor id, core id, and siblings do not AT ALL give any information about the REAL topology of the processors (e.g., the processor ids range from 0 to 7, and all the core ids are 0).

Can anybody explain this to me? How can I get the which processor and which processor are on the same hardware core?

BTW., I am using OpenSUSE 11.3.

Thanks,
Shawn

kbp 09-22-2010 10:59 PM

Hi,

The i7 is a quad core processor with HT, so I think /proc/cpuinfo should show:

Processor: [0,1,2,3,4,5,6,7]
Physical id: 0
Core id: [0,2,4,6]
cores: 4
siblings: 8

Physical id represents the actual cpu package, so if they all show '0' then they're all on the same hardware.

So processor 0 and 1 will have core id 0, indicating that they are the same core, but showing up as 2 processors because HT is enabled

got it ?

hth

syg00 09-23-2010 04:25 AM

Pretty close - mine shows:
Processor:[0,1,2,3,4,5,6,7]
Core id:[0,1,2,3,0,1,2,3]

duyuyang 09-23-2010 08:12 AM

Quote:

Originally Posted by syg00 (Post 4106488)
Pretty close - mine shows:
Processor:[0,1,2,3,4,5,6,7]
Core id:[0,1,2,3,0,1,2,3]

Thanks. But I was asking why in my case the /proc/cpuinfo is weird. Because it shows that (with ht):

Processor:[0,1,2,3,4,5,6,7]
Processor ID:[0,1,2,3,4,5,6,7]
Core id:[0,0,0,0,0,0,0,0]
Core:[1,1,1,1,1,1,1,1]
Sibling:[1,1,1,1,1,1,1,1]

And I just disabled the ht, and now it shows:
Processor:[0,1,2,3]
Processor ID:[0,1,2,3]
Core id:[0,0,0,0]
Cores:[1,1,1,1]
Siblings:[1,1,1,1]

What is the problem? My kernel has wrong config? Thanks.

Shawn

syg00 09-23-2010 08:21 AM

I don't see that at all - what distro, what kernel ?. Attach the full /proc/cpuinfo.

kbp 09-23-2010 06:55 PM

There have been problems with /proc/cpuinfo misreporting what's there, have you tried x86info ?


All times are GMT -5. The time now is 10:42 PM.