OSDN Git Service

KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file
authorPeter Xu <peterx@redhat.com>
Fri, 30 Jul 2021 22:04:52 +0000 (18:04 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 Aug 2021 20:06:11 +0000 (16:06 -0400)
commit3bcd0662d66fd07e596d2a7445e6b3215631b901
tree7ef410151a4187fa643e5552a1f9eda429b9b04e
parent4139b1972af281e0293c2414a0f1cd59fa5b2980
KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file

Use this file to dump rmap statistic information.  The statistic is done by
calculating the rmap count and the result is log-2-based.

An example output of this looks like (idle 6GB guest, right after boot linux):

Rmap_Count:     0       1       2-3     4-7     8-15    16-31   32-63   64-127  128-255 256-511 512-1023
Level=4K:       3086676 53045   12330   1272    502     121     76      2       0       0       0
Level=2M:       5947    231     0       0       0       0       0       0       0       0       0
Level=1G:       32      0       0       0       0       0       0       0       0       0       0

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20210730220455.26054-5-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/debugfs.c
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/mmu_internal.h