Thread (15 messages) 15 messages, 4 authors, 2022-08-30

Re: [PATCH v7 4/4] KVM: arm64/mmu: count KVM s2 mmu usage in secondary pagetable stats

From: Ryan Roberts <ryan.roberts@arm.com>
Date: 2022-08-24 17:03:45
Also in: cgroups, kvm, kvmarm, linux-mm, lkml

On 24/08/2022 15:24, Marc Zyngier wrote:
On Wed, 24 Aug 2022 14:43:43 +0100,
Ryan Roberts [off-list ref] wrote:
quoted
quoted
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 <redacted>
Reviewed-by: Oliver Upton <redacted>
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.
I also don't see what this buys us. This memory can't be reclaimed,
and is not part of KVM's job for the purpose of running guests, which
is what this series is about.

If anything, it should be accounted separately.
OK fair enough. It just struck me from the patch description that the 
host stage2 might qualify as "pages used by KVM in arm64 for stage2 
mmu". But I don't have any understanding of the use case this is for.

Sorry for the noise!

Thanks,
Ryan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help