[Cc: Rich Jones, addressing his feedback on IRC, below.] On Fri, Nov 08, 2019 at 10:22:47AM +0100, Kashyap Chamarthy wrote: > This blog post summarizes the talk "Micro-Optimizing KVM VM-Exits"[1], > given by Andrea Arcangeli at the recently concluded KVM Forum 2019. > > [1] > https://kvmforum2019.sched.com/event/Tmwr/micro-optimizing-kvm-vm-exits-andrea-arcangeli-red-hat-inc > > Signed-off-by: Kashyap Chamarthy <kcham...@redhat.com> > ---
[...] > +The microbechmark: CPUID in a one million loop > +---------------------------------------------- > + > +The synthetic microbenchmark (meaning, focus on measuring the > +performance of a specific area of code) Andrea used was to run the CPUID > +instruction one million times, without any GCC optimizations or caching. > +This was done to test the latency of VM-Exits. I can send a v2 (but will wait for any other feedback), or when applying someone please replace the above paragraph with the following: "Andrea constructed a synthetic microbenchmark program (without any GCC optimizations or caching) which runs the CPUID instructions one million times in a loop. This microbenchmark is meant to focus on measuring the performance of a specific area of the code -- in this case, to test the latency of VM-Exits." (Rich, hope that reads better. Thanks for the review.) > +While stressing that the results of these microbenchmarks do not > +represent real-world workloads, he had two goals in mind with it: (a) > +explain how the software mitigation works; and (b) to justify to the > +broader community the value of the software optimizations he's working > +on in KVM. > + > +Andrea then reasoned through several interesting graphs that show how > +CPU computation time gets impacted when you disable or enable the > +various kernel-space mitigations for Spectre v2, L1TF, MDS, et al. [...] -- /kashyap