Kernel loads only single processor on multi-processor system – ACPI: x2apic entry ignored

There multiple reports on this issue with different processors

kernel, which worked perfectly on multiple systems, loads on our new server and only one processor is shown

Just for the record, the SMP is enabled in the kernel (and in the BIOS – Hyperthreading and multicores are enabled, too):

root@srv ~ # zcat /proc/config.gz | grep 'CONFIG_SMP'
CONFIG_SMP=y

The problem is x2APIC Support in the BIOS of your server.

Apparently, our kernel (version 4.18.12) missed the kernel feature:

root@srv ~ # zcat /proc/config.gz | grep -i 'x2apic'
root@srv

You can see no kernel configuration entry “CONFIG_X86_X2APIC=y” is shown from the above command.

And if your BIOS enables the support of x2APIC you may end up with just one processor under Linux.

This was the case in our server. The x2APIC support is enabled in the BIOS and our kernel (version 4.18.12) does not have CONFIG_X86_X2APIC enabled.
To fix this issue you first might disable the feature in the BIOS and you are going to have all your processors shown and they could be used to compile fast your new kernel (of course, in the case you use custom kernel) after you enable the feature in the kernel CONFIG_X86_X2APIC, which is under
Kernel Configuration —> [*] Support x2apic. The asterisk means it is enabled, so build your kernel. Check and enable this “Device Drivers –> IOMMU Hardware Support –> Support for Interrupt Remapping”, too.
Here you can see how to enable and disable processor x2APIC support in HP ProLiant DL160 Gen9 (2 processors Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz) – Enable or Disable the processor x2APIC support in HP ProLiant DL160 Gen9.

The error in dmesg, which shows the x2APIC is the problem

....
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: x2apic entry ignored
[    0.000000] ACPI: x2apic entry ignored
[    0.000000] ACPI: x2apic entry ignored
....
[    0.114567] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 1/0x1 ignored.
[    0.115151] ACPI: Unable to map lapic to logical cpu number
[    0.115507] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 2/0x2 ignored.
[    0.116002] ACPI: Unable to map lapic to logical cpu number
[    0.116358] APIC: NR_CPUS/possible_cpus limit of 1 reached. Processor 3/0x3 ignored.
[    0.116952] ACPI: Unable to map lapic to logical cpu number
....

dmesg say x2apic ignored, you should enable it first:
Enable: Device Drivers --> IOMMU Hardware Support --> Support for Interrupt Remapping
Enable: Processor type and features --> Support x2apic

Additional information – enabling the feature x2apic to have all the processors.

Googling you might see there are forums or bug tracking systems, in which the fix is to Enable the feature – the exact opposite of what we experienced here! So if you happened to have this problem (single processor shown under Linux) and the errors shown above (x2apic entry ignored) and you are using a stock kernel of a Linux Distribution And do not forget UPDATE your kernel to the latest in the Linux Distro you are using! (in fact, it might solve your problem).

check your BIOS for this feature x2APIC and if it is disabled, enable it or if it is enabled, disable it!

Bonus check the SMP is it active

The problem:

root@srv ~ # cat /sys/devices/system/cpu/smt/control
notsupported
root@srv ~ # cat /sys/devices/system/cpu/smt/active
0
root@srv ~ # zcat /proc/config.gz | grep 'CONFIG_SMP'
CONFIG_SMP=y
root@srv ~ # zcat /proc/config.gz | grep -i 'x2apic'
root@srv
root@srv ~ # cat /proc/cpuinfo |grep processor|wc -l
1

You can see despite the SMP enabled
The normal status:

root@srv ~ # cat /sys/devices/system/cpu/smt/control
notsupported
root@srv ~ # cat /sys/devices/system/cpu/smt/active
0
root@srv ~ # zcat /proc/config.gz | grep 'CONFIG_SMP'
CONFIG_SMP=y
root@srv ~ # zcat /proc/config.gz | grep -i 'x2apic'
CONFIG_X86_X2APIC=y
root@srv ~ # cat /proc/cpuinfo |grep processor|wc -l
40

Leave a Reply

Your email address will not be published. Required fields are marked *