]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: Add statistic for remote tlb flushes
authorAvi Kivity <avi@qumranet.com>
Tue, 20 Nov 2007 21:01:14 +0000 (23:01 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:53:10 +0000 (17:53 +0200)
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c
drivers/kvm/x86.c

index b65f5dee4b1b5a86796e8ed8a426f9d29ea75145..048849d97b3587db825cfcfa95093a730714066a 100644 (file)
@@ -300,6 +300,7 @@ struct kvm_vm_stat {
        u32 mmu_pde_zapped;
        u32 mmu_flooded;
        u32 mmu_recycled;
+       u32 remote_tlb_flush;
 };
 
 struct kvm {
index 7939b5c9a4b4c20d89f84a1e4cbc6a765097172a..aec6b67cfebb4e97ff3e0debab928df64d7f3682 100644 (file)
@@ -115,6 +115,9 @@ void kvm_flush_remote_tlbs(struct kvm *kvm)
                if (cpu != -1 && cpu != raw_smp_processor_id())
                        cpu_set(cpu, cpus);
        }
+       if (cpus_empty(cpus))
+               return;
+       ++kvm->stat.remote_tlb_flush;
        smp_call_function_mask(cpus, ack_flush, NULL, 1);
 }
 
index b482b6a8a828085a87dd6c0fc81ba4bf3d564c86..ac09f381f47fc47444731e8f7c6b8491be101ada 100644 (file)
@@ -73,6 +73,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
        { "mmu_pde_zapped", VM_STAT(mmu_pde_zapped) },
        { "mmu_flooded", VM_STAT(mmu_flooded) },
        { "mmu_recycled", VM_STAT(mmu_recycled) },
+       { "remote_tlb_flush", VM_STAT(remote_tlb_flush) },
        { NULL }
 };