On 23/08/2013 15:23, 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?
You could look at the kern.sched.topology_spec sysctl, which outputs like this: <groups> <group level="1" cache-level="0"> <cpu count="8" mask="ff">0, 1, 2, 3, 4, 5, 6, 7</cpu> <children> <group level="2" cache-level="2"> <cpu count="4" mask="f">0, 1, 2, 3</cpu> </group> <group level="2" cache-level="2"> <cpu count="4" mask="f0">4, 5, 6, 7</cpu> </group> </children> </group> </groups> Note that this output is created from the kernel's own interpretation of the pysical CPUs, not necessarily from what the physical topology actually is (but if there is a mismatch, it's a bug).
signature.asc
Description: OpenPGP digital signature