KVM: Per-vcpu statistics

Make the exit statistics per-vcpu instead of global.  This gives a 3.5%
boost when running one virtual machine per core on my two socket dual core
(4 cores total) machine.

Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
Avi Kivity
2007-04-19 17:27:43 +03:00
parent 3fca036530
commit 1165f5fec1
6 changed files with 79 additions and 53 deletions

View File

@@ -936,7 +936,7 @@ static int nonpaging_init_context(struct kvm_vcpu *vcpu)
static void kvm_mmu_flush_tlb(struct kvm_vcpu *vcpu)
{
++kvm_stat.tlb_flush;
++vcpu->stat.tlb_flush;
kvm_arch_ops->tlb_flush(vcpu);
}