Microsoft posted a patch series for introducing Hyper-V integrated scheduler support into the Linux kernel for enhancing vCPU scheduling behavior for virtual machines running within Microsoft’s virtualized environment.
The integrated scheduler support for Hyper-V allows for the L1VH partition to schedule its own virtul CPUs and those of its guests across its “physical” cores.
The patch series explains:
“Microsoft Hypervisor originally provided two schedulers: root and core. The root scheduler allows the root partition to schedule guest vCPUs across physical cores, supporting both time slicing and CPU affinity (e.g., via cgroups). In contrast, the core scheduler delegates vCPU-to-physical-core scheduling entirely to the hypervisor.
Direct virtualization introduces a new privileged guest partition type – L1 Virtual Host (L1VH) — which can create child partitions from its own resources. These child partitions are effectively siblings, scheduled by the hypervisor’s core scheduler. This prevents the L1VH parent from setting affinity or time slicing for its own processes or guest VPs. While cgroups, CFS, and cpuset controllers can still be used, their effectiveness is unpredictable, as the core scheduler swaps vCPUs according to its own logic (typically round-robin across all allocated physical CPUs). As a result, the system may appear to “steal” time from the L1VH and its children.
To address this, Microsoft Hypervisor introduces the integrated scheduler. This allows an L1VH partition to schedule its own vCPUs and those of its guests across its “physical” cores, effectively emulating root scheduler behavior within the L1VH, while retaining core scheduler behavior for the rest of the system.”
This Hyper-V improvement for within the mainline Linux kernel code is currently under review on the LKML.
