From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF8BDC4338F for ; Wed, 18 Aug 2021 16:52:26 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 346C4610F9 for ; Wed, 18 Aug 2021 16:52:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 346C4610F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B4ED84A1AF; Wed, 18 Aug 2021 12:52:25 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sE0aGPcSkI1r; Wed, 18 Aug 2021 12:52:21 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 4A2B74B0CD; Wed, 18 Aug 2021 12:52:21 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2CF4F4B0CB for ; Wed, 18 Aug 2021 12:52:20 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79O9Clwhy4-5 for ; Wed, 18 Aug 2021 12:52:19 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2D2CC4B098 for ; Wed, 18 Aug 2021 12:52:19 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 63D69610E8; Wed, 18 Aug 2021 16:52:17 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mGOnX-005npK-AX; Wed, 18 Aug 2021 17:52:15 +0100 Date: Wed, 18 Aug 2021 17:52:14 +0100 Message-ID: <87eeaqsnk1.wl-maz@kernel.org> From: Marc Zyngier To: Jing Zhang Subject: Re: [PATCH] KVM: stats: Add VM stat for remote tlb flush requests In-Reply-To: References: <20210817002639.3856694-1-jingzhangos@google.com> <87v943rx32.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: jingzhangos@google.com, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, pbonzini@redhat.com, dmatlack@google.com, pshier@google.com, oupton@google.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: KVM , Peter Shier , David Matlack , Paolo Bonzini , KVMARM X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Wed, 18 Aug 2021 17:15:36 +0100, Jing Zhang wrote: > > Hi Marc, > > On Wed, Aug 18, 2021 at 1:11 AM Marc Zyngier wrote: > > > > On Tue, 17 Aug 2021 01:26:39 +0100, > > Jing Zhang 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. > > > Understood. Thanks. > > > > > > Original-by: David Matlack > > > Signed-off-by: Jing Zhang > > > --- > > > 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]. > I guess you mean the change for "remote_tlb_flush" has been queued, > not "remote_tlb_flush_requests"? Yes, this is what I meant, as I only quoted the bit that was redundant. > These two counters would have the same value for arm64, but not for > others (at least x86). Sure. It is just that this patch does two things at once, but doesn't advertise it. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm