Linux Patches Improve VM Guest Performance When The Host Encounters Memory Pressure
An updated set of patches were posted on Friday that seem to improve the Linux guest VM performance when the host is under heavy memory pressure.
Since mid-2021 Google's ChromeOS has been using similar code on "tens of millions devices" and recently Google engineer Yu Zhao -- known for his work on MGLRU -- has been working to upstream this improvement.
The intent of the patches is to provide a fast path for clearing the accessed bit without taking the KVM MMU lock. Yu Zhao previously posted these patches in February while Friday's v2 patches refactor the code and incorporate feedback from earlier review.
The patch series explains:
Benchmarks are said to be coming soon for quantifying the VM guest performance improvement while the host is challenged by memory pressure.
Google engineers are also working on Working Set Reporting for better dealing with over-committed VMs as another improvement for the kernel.
Since mid-2021 Google's ChromeOS has been using similar code on "tens of millions devices" and recently Google engineer Yu Zhao -- known for his work on MGLRU -- has been working to upstream this improvement.
The intent of the patches is to provide a fast path for clearing the accessed bit without taking the KVM MMU lock. Yu Zhao previously posted these patches in February while Friday's v2 patches refactor the code and incorporate feedback from earlier review.
The patch series explains:
"The goal of this patchset is to optimize the performance of guests when the host memory is overcommitted. It focuses on a simple yet common case where hardware sets the accessed bit in KVM PTEs and VMs are not nested. Complex cases fall back to the existing slow path where kvm->mmu_lock is then taken.
The fast path relies on two techniques to safely clear the accessed bit: RCU and CAS. The former protects KVM page tables from being freed while the latter clears the accessed bit atomically against both the hardware and other software page table walkers."
Benchmarks are said to be coming soon for quantifying the VM guest performance improvement while the host is challenged by memory pressure.
Google engineers are also working on Working Set Reporting for better dealing with over-committed VMs as another improvement for the kernel.
2 Comments