Linux 4.18 Set To Receive Scheduler Optimization For vCPUs
Written by Michael Larabel in Virtualization on 4 May 2018 at 08:46 AM EDT. 3 Comments
VIRTUALIZATION --
The Linux kernel scheduler optimization work continues and it looks like for Linux 4.18 there will be at least another optimization to help out vCPUs in a virtualized environment.

Rohit Jain of Oracle sent in a patch this week that is already queued as part of scheduler work for the next kernel series, Linux 4.18. The patch is sched/core: Don't schedule threads on pre-empted vCPUs. Rohit explained:
In paravirt configurations today, spinlocks figure out whether a vCPU is running to determine whether or not spinlock should bother spinning. We can use the same logic to prioritize CPUs when scheduling threads. If a vCPU has been pre-empted, it will incur the extra cost of VMENTER and the time it actually spends to be running on the host CPU. If we had other vCPUs which were actually running on the host CPU and idle we should schedule threads there.

The Oracle developer found improvements with the "schbench" scheduler benchmark improved generally by a few percent but in some cases were up to a 8~25% improvement with this three line patch to return when the vCPU is pre-empted.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Virtualization News
Popular News This Week