I am trying to understand the "core_id" sequence reported. My machine has 2 sockets, 20 cores and hyperthreading enabled (80 CPU). I am looking at the "core_id" values which are reported using:
root@mybox:~# cat /sys/devices/system/cpu/cpu*/topology/core_id | sort -n | uniq
0
1
2
3
4
8
9
10
11
12
16
17
18
19
20
24
25
26
27
28
root@mybox:~#
root@mybox:~# cat /sys/devices/system/cpu/cpu*/topology/core_id | sort -n | uniq | wc -l
20
root@mybox:~#
Here, I can see that the core_id's are not contiguous. They follow a pattern. Last 3 numbers of every octet are skipped (5, 6, 7 then 13, 14, 15 then 21, 22, 23). So, for listing 20 cores, it used sequence numbers from 0 to 28.
I am trying to figure out why it skips some of the sequence numbers but couldn't find any relevant documentation for the same. Can anyone please help me in understanding this in a better way.
Thanks.