linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Roberts <ryan.roberts@arm.com>
To: Yosry Ahmed <yosryahmed@google.com>, Tejun Heo <tj@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Zefan Li <lizefan.x@bytedance.com>, Marc Zyngier <maz@kernel.org>,
	James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	Shakeel Butt <shakeelb@google.com>,
	Oliver Upton <oupton@google.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Huang@google.com, Shaoqin <shaoqin.huang@intel.com>,
	linux-mm@kvack.org, cgroups@vger.kernel.org,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, nd@arm.com
Subject: Re: [PATCH v7 4/4] KVM: arm64/mmu: count KVM s2 mmu usage in secondary pagetable stats
Date: Wed, 24 Aug 2022 14:43:43 +0100	[thread overview]
Message-ID: <319904e0-3722-8ab1-cf74-491b9c32e23b@arm.com> (raw)
In-Reply-To: <20220823004639.2387269-5-yosryahmed@google.com>

> Count the pages used by KVM in arm64 for stage2 mmu in memory stats
> under secondary pagetable stats (e.g. "SecPageTables" in /proc/meminfo)
> to give better visibility into the memory consumption of KVM mmu in a
> similar way to how normal user page tables are accounted.
> 
> Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
> Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
> Reviewed-by: Marc Zyngier <maz@kernel.org>
> ---

I see that you are not including the memory reserved for the host stage2 
table when using protected KVM. Is this something worth adding? (See 
arch/arm64/kvm/pkvm.c:kvm_hyp_reserve()).

This reservation is done pretty early on in bootmem_init() so not sure 
if this could cause some init ordering issues that might be tricky to 
solve though.

Thanks,
Ryan




  reply	other threads:[~2022-08-24 13:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  0:46 [PATCH v7 0/4] KVM: mm: count KVM mmu usage in memory stats Yosry Ahmed
2022-08-23  0:46 ` [PATCH v7 1/4] mm: add NR_SECONDARY_PAGETABLE to count secondary page table uses Yosry Ahmed
2022-08-24 13:41   ` Ryan Roberts
2022-08-24 17:25     ` Yosry Ahmed
2022-08-24 17:40       ` Ryan Roberts
2022-08-23  0:46 ` [PATCH v7 2/4] KVM: mmu: add a helper to account memory used by KVM MMU Yosry Ahmed
2022-08-23  0:46 ` [PATCH v7 3/4] KVM: x86/mmu: count KVM mmu usage in secondary pagetable stats Yosry Ahmed
2022-08-26 20:20   ` Sean Christopherson
2022-08-26 21:25     ` Yosry Ahmed
2022-08-30 21:52     ` Sean Christopherson
2022-08-30 23:48       ` Yosry Ahmed
2022-08-23  0:46 ` [PATCH v7 4/4] KVM: arm64/mmu: count KVM s2 " Yosry Ahmed
2022-08-24 13:43   ` Ryan Roberts [this message]
2022-08-24 14:24     ` Marc Zyngier
2022-08-24 17:03       ` Ryan Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=319904e0-3722-8ab1-cf74-491b9c32e23b@arm.com \
    --to=ryan.roberts@arm.com \
    --cc=Huang@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexandru.elisei@arm.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=james.morse@arm.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizefan.x@bytedance.com \
    --cc=maz@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=nd@arm.com \
    --cc=oupton@google.com \
    --cc=pbonzini@redhat.com \
    --cc=roman.gushchin@linux.dev \
    --cc=seanjc@google.com \
    --cc=shakeelb@google.com \
    --cc=shaoqin.huang@intel.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tj@kernel.org \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=yosryahmed@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox