Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2013 15:24:18 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        hackers@freebsd.org, Dmitry Sivachenko <trtrmitya@gmail.com>
Subject:   Re: About CPU cores numbering an processor affinity
Message-ID:  <201309031524.18162.jhb@freebsd.org>
In-Reply-To: <1D21F5BC-63CD-4B33-9286-6687E62FDB15@gmail.com>
References:  <1D21F5BC-63CD-4B33-9286-6687E62FDB15@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201309031524.18162.jhb>