On Fri, 10 Apr 2020 at 23:17, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > On 10/04/20 03:03, Wanpeng Li wrote: > > From: Wanpeng Li <wanpengli@xxxxxxxxxxx> > > > > IPI and Timer cause the main MSRs write vmexits in cloud environment > > observation, let's optimize virtual IPI latency more aggressively to > > inject target IPI as soon as possible. > > > > Running kvm-unit-tests/vmexit.flat IPI testing on SKX server, disable > > adaptive advance lapic timer and adaptive halt-polling to avoid the > > interference, this patch can give another 7% improvement. > > > > w/o fastpath -> fastpath 4238 -> 3543 16.4% > > fastpath -> ultra fastpath 3543 -> 3293 7% > > w/o fastpath -> ultra fastpath 4238 -> 3293 22.3% > > > > This also revises the performance data in commit 1e9e2622a1 (KVM: VMX: > > FIXED+PHYSICAL mode single target IPI fastpath), that testing adds > > --overcommit cpu-pm=on to kvm-unit-tests guest which is unnecessary. > > > > Tested-by: Haiwei Li <lihaiwei@xxxxxxxxxxx> > > Cc: Haiwei Li <lihaiwei@xxxxxxxxxxx> > > Signed-off-by: Wanpeng Li <wanpengli@xxxxxxxxxxx> > > --- > > v1 -> v2: > > * rebase on latest kvm/queue > > * update patch description > > > > arch/x86/include/asm/kvm_host.h | 6 +++--- > > arch/x86/kvm/svm/svm.c | 21 ++++++++++++++------- > > arch/x86/kvm/vmx/vmx.c | 19 +++++++++++++------ > > arch/x86/kvm/x86.c | 4 ++-- > > 4 files changed, 32 insertions(+), 18 deletions(-) > > That's less ugly than I expected. :D I'll queue it in the next week or > so. But even though the commit subject is cool, I'll change it to "KVM: > x86: move IPI fastpath inside kvm_x86_ops.run". Thanks. Wanpeng