Intel's Latest Linux Patches To Boost VM Performance - Particularly For High I/O Use

Written by Michael Larabel in Intel on 2 June 2023 at 08:23 AM EDT. Add A Comment
It's almost a daily occurrence to find interesting Linux kernel patches (and to other open-source projects too!) by Intel's large cabal of open-source engineers. The latest crossing my radar is for allowing the Linux "intel_idle" driver to run inside virtual machine (VM) guests.

Prominent Intel Linux engineer Arjan van de Ven has posted a set of patches for allowing intel_idle driver support for virtual machines. These patches paired with forthcoming C0.2 support patches should provide a nice performance boost to VMs, particularly around those enduring heavy I/O use.

Intel Xeon Max

Arjan explained with the patches:
intel_idle provides the CPU Idle states (for power saving in idle) to the cpuidle framework, based on per-cpu tables combined with limited hardware enumeration. This combination of cpuidle and intel_idle provides dynamic behavior where power saving and performance impact are dynamically balanced and where a set of generic knobs are provided in sysfs for users to tune the heuristics (and get statistics etc)

However, intel_idle currently does not support running inside VM guests, and the linux kernel falls back to either ACPI based idle (if supported by the hypervisor/virtual bios) or just the default x86 fallback "hlt" based idle method... that was introduced in the 1.2 kernel series... and lacks all the dynamic behavior, user control and statistics that cpuidle brings.

While this is obviously functional, it's not great and we can do better for the user by hooking up intel_idle into the cpuidle framework also for the "in a guest" case. And not only not great for the user, it's also not optimal and lacks two key capabilities that are supported by the bare metal case:

1) The ability to flush the TLB for very long idle periods, to avoid a costly (and high latency) IPI wakeup later, of an idle vCPU when a process that used to run on the idle vCPU does an munmap or similar operation. Avoiding high latency IPIs helps avoid performance jitter.
2) The ability to use the new Intel C0.2 idle state instead of polling for very short duration idle periods to save power (and carbon footprint)

This patch series adds the basic support to run in a VM guest to the intel_idle driver, and then addresses the first of these shortfalls. The C0.2 gap will be fixed with a small additional patch after the C0.2 support is merged seperately.

Great work and will be interesting to test once the C0.2 support patches are also ready for benefiting the latest Intel Xeon Scalable servers.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week