About CPU cores numbering an processor affinity

John Baldwin jhb at freebsd.org
Tue Sep 3 20:23:26 UTC 2013


On Friday, August 23, 2013 9:23:51 am Dmitry Sivachenko wrote:
> Hello!
> 
> I am using FreeBSD-9-STABLE on the following hardware:
> 
> FreeBSD/SMP: Multiprocessor System Detected: 24 CPUs
> FreeBSD/SMP: 2 package(s) x 6 core(s) x 2 SMT threads
> 
> So I have 2 physical CPUs with 6 core each.
> 
> # cpuset -g
> pid -1 mask: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 
18, 19, 20, 21, 22, 23
> 
> 
> So each of 24 cores are numbered 0..23.
> 
> 1) In what particular order are these cores numbered?  Can I assume that 
0..11 correspond to 1st physical CPU and 12..23 to second?  How SMT threads 
are numbered within each core?

Yes, the numbering is "grouped" so that you have each package as a contiguous
block.  Each core is a contiguous block as well, so SMT threads are adjacent
to each other.

> Should I use "-x" option of cpuset for that purpose (to bind irq 260 and 261 
in my example)?

Yes, cpuset -x.

-- 
John Baldwin


More information about the freebsd-hackers mailing list