Re: Odd performance results
From: Peter Zijlstra
Date: Tue Jul 12 2016 - 14:51:33 EST
On Tue, Jul 12, 2016 at 10:49:58AM -0700, H. Peter Anvin wrote:
> On 07/12/16 08:05, Paul E. McKenney wrote:
> The CPU in question (and /proc/cpuinfo should show this) has four cores
> with a total of eight threads. The "siblings" and "cpu cores" fields in
> /proc/cpuinfo should show the same thing. So I am utterly confused
> about what is unexpected here?
Typically threads are enumerated differently on Intel parts. Namely:
cpu_id = code_id + nr_cores * smt_id
which gives, for a 4 core, 2 thread part:
0-3: core 0-3, smt0
4-7: core 0-3, smt1
My Core i7-2600k for example has:
$ cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list
0,4
1,5
2,6
3,7
0,4
1,5
2,6
3,7
The ordering Paul has, namely 0,1 for core0,smt{0,1} is not something
I've ever seen on an Intel part. AMD otoh does enumerate their CMT stuff
like what Paul has.