2014-09-17 08:15+0800, Wanpeng Li: > Hi Radim, > On Mon, Sep 15, 2014 at 09:33:52PM +0200, Radim Krčmář wrote: > >Do you prefer the current behavior? > > > >--- 8< --- > >KVM: x86: count actual tlb flushes > > > >- we count KVM_REQ_TLB_FLUSH requests, not actual flushes > > So there maybe multiple requests accumulated at the point of kvm_check_request, > if your patch account these accumulations correctly? It will ignore request accumulations and count it as one TLB flush, we have to decide what is correct (the value is just statistics) a) count local KVM_REQ_TLB_FLUSH requests b) count all TLB flushes c) both (a) and (b) I was thinking that when you look at /sys/kernel/debug/kvm/tlb_flushes, you are interested in the number of TLB flushes that VMs did, not requests, so you won't have to add remote_tlb_flushes multiplied by maximal vcpu count and guess their amount from this upper bound. And that we don't even care about requests, so (c) is just complication. --- I tried to get an idea about the number of coalesced requests and added a counter called tlb_flush_real, making option (c). After a night of reading virtio-rng (different experiment) on 1 VCPU VM: # cat /sys/kernel/debug/kvm/{tlb_flush{,_real},remote_tlb_flush} 5927 5206 0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html