I think I’ve just uncovered a rather nasty bug in the xen_acpi_processor driver in dom0. 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 on mobile platforms.
This can impact users who set dom0_max_vcpus to a lesser value than their number of CPU cores, but is particularly relevant if SMT is enabled in firmware but disabled in Xen. As the cores are disabled manually by Xen, dom0 will only see the number of active cores; but as this is a lesser number of cores than Xen knows of it will mismatch and half the cores will not see C-state information.
The bug is reproducible easily by setting dom0_max_vcpus to less than your physical core count and running xenpm start 1. See if there are any cores that only display C0 and C1 C-states.
Alex
|