CPU Pinning Alder Lake

I think I’ve just uncovered a rather nasty bug. If the vcpu count in dom0 is set to anything other than the exact number of physical cores, the xen_acpi_processor kernel driver will fail to upload the C-state information for those cores to Xen, resulting in Xen never knowing about the C-states, which significantly impacts battery life.

You can check if you’re impacted by this by running xenpm start 1. If there are any CPUs that only display C0 and C1, then Xen doesn’t know about the additional C-states. The fix is to set the Xen boot parameter dom0_max_vcpus to your exact number of physical cores, including hyperthreading cores even if they’re disabled in software.

4 Likes