linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] KVM: mm: count KVM page table pages in pagetable stats
@ 2022-04-04 23:41 Yosry Ahmed
  2022-04-04 23:41 ` [PATCH v2 1/5] KVM: mm: add a helper to account page table pages used by KVM Yosry Ahmed
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Yosry Ahmed @ 2022-04-04 23:41 UTC (permalink / raw)
  To: Huacai Chen, Aleksandar Markovic, Anup Patel, Atish Patra,
	Paolo Bonzini, Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li,
	Jim Mattson, Joerg Roedel
  Cc: mizhang, David Matlack, kvm, kvm-riscv, linux-mips, linux-mm,
	linux-kernel, Shakeel Butt, Andrew Morton, Yosry Ahmed

We keep track of several kernel memory stats (total kernel memory, page
tables, stack, vmalloc, etc) on multiple levels (global, per-node,
per-memcg, etc). These stats give insights to users to how much memory
is used by the kernel and for what purposes.

Currently, memory used by kvm for its page tables is not accounted in
the pagetable stats. This patch series accounts the memory pages used by
KVM for page tables in those stats.

The riscv and mips patches are not tested properly due to lack of
resources. Feel free to test or drop them.

Yosry Ahmed (5):
  KVM: mm: add a helper to account page table pages used by KVM.
  KVM: x86: mm: count KVM page table pages in pagetable stats
  KVM: arm64: mm: count KVM page table pages in pagetable stats
  KVM: riscv: mm: count KVM page table pages in pagetable stats
  KVM: mips: mm: count KVM page table pages in pagetable stats

 arch/arm64/kernel/image-vars.h |  3 ++
 arch/arm64/kvm/hyp/pgtable.c   | 50 +++++++++++++++++++++-------------
 arch/mips/kvm/mips.c           |  1 +
 arch/mips/kvm/mmu.c            |  9 +++++-
 arch/riscv/kvm/mmu.c           | 26 +++++++++++++-----
 arch/x86/kvm/mmu/mmu.c         | 16 +++++++++--
 arch/x86/kvm/mmu/tdp_mmu.c     | 16 +++++++++--
 include/linux/kvm_host.h       |  9 ++++++
 8 files changed, 99 insertions(+), 31 deletions(-)

-- 
2.35.1.1094.g7c7d902a7c-goog



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-04-05 18:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 23:41 [PATCH v2 0/5] KVM: mm: count KVM page table pages in pagetable stats Yosry Ahmed
2022-04-04 23:41 ` [PATCH v2 1/5] KVM: mm: add a helper to account page table pages used by KVM Yosry Ahmed
2022-04-04 23:41 ` [PATCH v2 2/5] KVM: x86: mm: count KVM page table pages in pagetable stats Yosry Ahmed
2022-04-04 23:41 ` [PATCH v2 3/5] KVM: arm64: " Yosry Ahmed
2022-04-04 23:41 ` [PATCH v2 4/5] KVM: riscv: " Yosry Ahmed
2022-04-04 23:41 ` [PATCH v2 5/5] KVM: mips: " Yosry Ahmed
2022-04-05 18:44 ` [PATCH v2 0/5] KVM: " Sean Christopherson
2022-04-05 18:50   ` Yosry Ahmed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).