diff options
author | Wanpeng Li <wanpengli@tencent.com> | 2020-02-26 10:41:02 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-03-16 17:57:39 +0100 |
commit | 4abaffce4d25aa41392d2e81835592726d757857 (patch) | |
tree | 320b25cf896492063edcab40c3173e7a3e967bfb /mm/page_counter.c | |
parent | 49f933d445b611a237a4687ec7135b57b6b2cfba (diff) |
KVM: LAPIC: Recalculate apic map in batch
In the vCPU reset and set APIC_BASE MSR path, the apic map will be recalculated
several times, each time it will consume 10+ us observed by ftrace in my
non-overcommit environment since the expensive memory allocate/mutex/rcu etc
operations. This patch optimizes it by recaluating apic map in batch, I hope
this can benefit the serverless scenario which can frequently create/destroy
VMs.
Before patch:
kvm_lapic_reset ~27us
After patch:
kvm_lapic_reset ~14us
Observed by ftrace, improve ~48%.
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mm/page_counter.c')
0 files changed, 0 insertions, 0 deletions