提交 0f74a24c 编写于 作者: A Avi Kivity

KVM: Add statistic for remote tlb flushes

Signed-off-by: NAvi Kivity <avi@qumranet.com>
上级 e5a4c8ca
...@@ -300,6 +300,7 @@ struct kvm_vm_stat { ...@@ -300,6 +300,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 remote_tlb_flush;
}; };
struct kvm { struct kvm {
......
...@@ -115,6 +115,9 @@ void kvm_flush_remote_tlbs(struct kvm *kvm) ...@@ -115,6 +115,9 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
if (cpu != -1 && cpu != raw_smp_processor_id()) if (cpu != -1 && cpu != raw_smp_processor_id())
cpu_set(cpu, cpus); cpu_set(cpu, cpus);
} }
if (cpus_empty(cpus))
return;
++kvm->stat.remote_tlb_flush;
smp_call_function_mask(cpus, ack_flush, NULL, 1); smp_call_function_mask(cpus, ack_flush, NULL, 1);
} }
......
...@@ -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) },
{ "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
{ NULL } { NULL }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册