Re: About CPU cores numbering an processor affinity
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 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: About CPU cores numbering an processor affinity
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=ff0, 1, 2, 3, 4, 5, 6, 7/cpu children group level=2 cache-level=2 cpu count=4 mask=f0, 1, 2, 3/cpu /group group level=2 cache-level=2 cpu count=4 mask=f04, 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
About CPU cores numbering an processor affinity
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? 2) This machine has Intel network adapter (em driver). I want to pin network interrupt thread and proxy software to the same processor so they share at least L2 or L3 cache. How can I do this? From the one hand, I see the following processes: 11 root -92- 0K 720K WAIT 19 146:38 0.00% intr{irq260: em1:rx 0} 11 root -92- 0K 720K WAIT 19 15:11 0.00% intr{irq261: em1:tx 0} From the other hand, the following processes seems to be unrelated to network but they share same PID: 11 root -60- 0K 720K WAIT1 131:20 0.00% intr{swi4: clock} 11 root -88- 0K 720K WAIT 17 40:03 0.00% intr{irq263: ahci0} 11 root -72- 0K 720K WAIT 22 17:35 0.00% intr{swi1: netisr 0} 11 root -88- 0K 720K WAIT3 3:08 0.00% intr{irq256: mfi0} Should I use -x option of cpuset for that purpose (to bind irq 260 and 261 in my example)? Thanks in advance! ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org