0

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.

1 Answer 1

1

This usually results from one of two things, either:

  1. The CPU actually has more cores, and the firmware is disabling some of them (or the manufacturer disabled some).
  2. The firmware is leaving space in the various tables that the OS reads this data from for the possibility of hot-plugging bigger CPU's.

Given that this is a 2 socket system, I'm betting the second is the case, as it's pretty standard to be able to hot-remove a CPU package and then hotplug a new one, and the firmware has to handle the case where the new CPU has more cores than the old one. The split into 4 groups of 5 probably also matches the die layout of the CPU's themselves.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .