Commit dfc5aa00 authored by Avi Kivity's avatar Avi Kivity

KVM: MMU: Add cache miss statistic

Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent caa5b8a5
...@@ -715,6 +715,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu, ...@@ -715,6 +715,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
pgprintk("%s: found\n", __FUNCTION__); pgprintk("%s: found\n", __FUNCTION__);
return sp; return sp;
} }
++vcpu->kvm->stat.mmu_cache_miss;
sp = kvm_mmu_alloc_page(vcpu, parent_pte); sp = kvm_mmu_alloc_page(vcpu, parent_pte);
if (!sp) if (!sp)
return sp; return sp;
......
...@@ -73,6 +73,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { ...@@ -73,6 +73,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
{ "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) }, { "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) },
{ "mmu_flooded", VM_STAT(mmu_flooded) }, { "mmu_flooded", VM_STAT(mmu_flooded) },
{ "mmu_recycled", VM_STAT(mmu_recycled) }, { "mmu_recycled", VM_STAT(mmu_recycled) },
{ "mmu_cache_miss", VM_STAT(mmu_cache_miss) },
{ "remote_tlb_flush", VM_STAT(remote_tlb_flush) }, { "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
{ NULL } { NULL }
}; };
......
...@@ -289,6 +289,7 @@ struct kvm_vm_stat { ...@@ -289,6 +289,7 @@ struct kvm_vm_stat {
u32 mmu_pde_zapped; u32 mmu_pde_zapped;
u32 mmu_flooded; u32 mmu_flooded;
u32 mmu_recycled; u32 mmu_recycled;
u32 mmu_cache_miss;
u32 remote_tlb_flush; u32 remote_tlb_flush;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment