VFIO Gets Batched Page Pinning For An Easy Performance Improvement With Linux 5.12
The VFIO changes to the Linux 5.12 kernel include an optimization worth mentioning.
The VFIO driver work for Linux 5.12 isn't too significant but the batched page pinning will be of interest to some. Up to now the VFIO kernel code has relied on pinning one 4K page at a time. That major efficiency bottleneck has been addressed with the batched page pinning to handle batches of 512 at a time.
With this optimization pursued by Oracle's Daniel Jordan, he found that QEMU pins pages for guests around 8% faster than on prior kernels.
So with this next version of the Linux kernel the VFIO Type-1 driver should be pinning multiple pages concurrently and in turn should yield faster start times for QEMU guests with 2G+ of memory. That optimization seems to be the main enhancement of the VFIO code for Linux 5.12 besides some fixes and other low-level work.