Re: [PATCH] KVM: stats: Add VM stat for remote tlb flush requests

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

 



On Tue, 17 Aug 2021 01:26:39 +0100,
Jing Zhang <jingzhangos@xxxxxxxxxx> wrote:
> 
> Add a new stat that counts the number of times a remote TLB flush is
> requested, regardless of whether it kicks vCPUs out of guest mode. This
> allows us to look at how often flushes are initiated.

nit: this is a very x86-centric view of things. On arm64, TLB
invalidation is broadcast in HW, and does not interrupt the guest
execution.

> 
> Original-by: David Matlack <dmatlack@xxxxxxxxxx>
> Signed-off-by: Jing Zhang <jingzhangos@xxxxxxxxxx>
> ---
>  arch/arm64/kvm/mmu.c      | 1 +
>  include/linux/kvm_host.h  | 3 ++-
>  include/linux/kvm_types.h | 1 +
>  virt/kvm/kvm_main.c       | 1 +
>  4 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> index 0625bf2353c2..f5bb235bbb59 100644
> --- a/arch/arm64/kvm/mmu.c
> +++ b/arch/arm64/kvm/mmu.c
> @@ -80,6 +80,7 @@ static bool memslot_is_logging(struct kvm_memory_slot *memslot)
>   */
>  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);
>  }

We already have this queued for 5.15 [1].

Thanks,

	M.

[1] https://lore.kernel.org/r/20210727103251.16561-1-pbonzini@xxxxxxxxxx

-- 
Without deviation from the norm, progress is not possible.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux