Re: [Question] remote_tlb_flush statistic is missed from kvm_flush_remote_tlbs() ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/17/22 12:33, Andrew Jones wrote:
I don't see the change for commit 38f703663d4c as of an upstream pull
right now

$ git show 47700948a4ab:arch/arm64/kvm/mmu.c | grep -A4 'void kvm_flush_remote_tlbs'
void kvm_flush_remote_tlbs(struct kvm *kvm)
{
	++kvm->stat.generic.remote_tlb_flush_requests;
	kvm_call_hyp(__kvm_tlb_flush_vmid, &kvm->arch.mmu);
}

and I do see it got dropped with merge commit e99314a340d2.

$ git diff 419025b3b419 0d0a19395baa -- arch/arm64/kvm/mmu.c | grep -A5 'void kvm_flush_remote_tlbs'
  void kvm_flush_remote_tlbs(struct kvm *kvm)
  {
+	++kvm->stat.generic.remote_tlb_flush_requests;
  	kvm_call_hyp(__kvm_tlb_flush_vmid, &kvm->arch.mmu);
-	++kvm->stat.generic.remote_tlb_flush;
  }

Hi,

on ARM it makes little sense to split remote_tlb_flush_requests and remote_tlb_flush. On x86 the latter means "a vmexit was forced in order to flush the TLB", and in fact this common code:

        if (!kvm_arch_flush_remote_tlb(kvm)
            || kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
                ++kvm->stat.generic.remote_tlb_flush;

should probably be written

        if (!kvm_arch_flush_remote_tlb(kvm))
		return;

	if (kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
		++kvm->stat.generic.remote_tlb_flush;

Paolo

_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux