Quantcast
Channel: cpuinfo to decide processor affinity - Stack Overflow
Viewing all articles
Browse latest Browse all 2

cpuinfo to decide processor affinity

$
0
0

I've tried to decide processor affinity rule for my applications according to /proc/cpuinfo , My redhat Linux showes

processor   : 0   to  47  , means server has 48 processor unitphysical id : 0   to  3   , means server has 4 cpu sockets cpu cores   : 6  , means  each socket has 6 cores siblings    :  12 , means each core has 2  hyperthreads 

So totally , this server has 4 * 6 * 2 = 48 processor units , am I correct so far ?

What I like to do is to use sched_setaffinity function , first I like to know is the hyperthreads in the same core , for example ...

processor 0  : physical id:0,core id: 0  ...processor 24 : physical id:0,core id: 0  ...

If in my application , I use CPU_SET(0, &mask) in thread1 , CPU_SET(24, &mask)in thread2 , then I might can say that thread1 and thread2 will share the same L1 cache,and of course share the same L2 cache , too ...am I correct in this guess ?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images