which logical core is hyperthread core in Core i7?

which logical core is hyperthread core in Core i7?

Hi, all:
Now I have a Core i7-930 CMP platform. There are eight logical cores when executiong command top in linux(BIOS HT was enabled). And We can use the affinity interface of linux to set the process to a specified core. My question is how to identify which core is hyerthread core?Orwhich two cores share a physical processor? Fox example, there are 0, 1, 2,3,4,5,6,7 logical cores.
(0,1) (2,3) (4,5) (6,7) or (0,2) (1,3) (4,6) (5,7) or (0,3) (1,4).......
how to determine which two threads shared a physical core? I want to set my application to the two logical cores which shared a physical core?

Anyone have some suggestions? Thanks a lot!


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I cat the /proc/cpuinfo file, I found the following discipline:

logical processor: 0 1 2 3 4 5 6 7
core id: 0 1 2 3 0 1 2 3
physical id :0 0 0 0 0 0 0 0

So I guess, (0,4) share a physical core. physical id represents a socket. core id represents four physical core.
so (0,4) (1,5) (2,6) (3,7) can be think that each pair share a physical core?

Linux tips: How to find out if a your CPU supports HT (Hyper-Threading)? http://www.ducea.com/2006/06/23/linux-tips-how-to-find-out-if-a-your-cpu... http://www.linuxforums.org/articles/finding-server-is-multi-processor-mu... The above links assue my guess.

Please note that if you have core sensitive programming, you need to keep the code that makes this determination at run time. Do not assume that what you read for pairing today will be what you experience tomorrow. Boot optionsmay cause this to vary.

Jim Dempsey

good suggestions! thanks!

Leave a Comment

Please sign in to add a comment. Not a member? Join today