[PATCH 8/8] KVM: add debugfs file to show the number of async pf

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Xiao Guangrong
Date: Wednesday, October 27, 2010 - 2:10 am

It can help us to see the state of async pf

Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
 arch/x86/kvm/x86.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c0e7ad0..2dd8059 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -88,6 +88,8 @@ static u64 __read_mostly efer_reserved_bits = 0xfffffffffffffffeULL;
 
 #define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM
 #define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
+#define VCPU_ASYNC_PF_STAT offsetof(struct kvm_vcpu, async_pf.queued), \
+							KVM_STAT_VCPU
 
 static void update_cr8_intercept(struct kvm_vcpu *vcpu);
 static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid,
@@ -141,6 +143,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = {
 	{ "insn_emulation_fail", VCPU_STAT(insn_emulation_fail) },
 	{ "irq_injections", VCPU_STAT(irq_injections) },
 	{ "nmi_injections", VCPU_STAT(nmi_injections) },
+	{ "async_pf_queued", VCPU_ASYNC_PF_STAT},
 	{ "mmu_shadow_zapped", VM_STAT(mmu_shadow_zapped) },
 	{ "mmu_pte_write", VM_STAT(mmu_pte_write) },
 	{ "mmu_pte_updated", VM_STAT(mmu_pte_updated) },
-- 
1.7.0.4

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/8] KVM: fix tracing kvm_try_async_get_page, Xiao Guangrong, (Wed Oct 27, 2:01 am)
[PATCH 2/8] KVM: cleanup aysnc_pf tracepoints, Xiao Guangrong, (Wed Oct 27, 2:02 am)
[PATCH 4/8] KVM: avoid unnecessary wait for a async pf, Xiao Guangrong, (Wed Oct 27, 2:04 am)
[PATCH 6/8] KVM: simply wakup async pf, Xiao Guangrong, (Wed Oct 27, 2:07 am)
[PATCH 7/8] KVM: make async_pf work queue lockless, Xiao Guangrong, (Wed Oct 27, 2:09 am)
[PATCH 8/8] KVM: add debugfs file to show the number of as ..., Xiao Guangrong, (Wed Oct 27, 2:10 am)
Re: [PATCH 1/8] KVM: fix tracing kvm_try_async_get_page, Gleb Natapov, (Wed Oct 27, 2:59 am)
Re: [PATCH 2/8] KVM: cleanup aysnc_pf tracepoints, Gleb Natapov, (Wed Oct 27, 3:10 am)
Re: [PATCH 6/8] KVM: simply wakup async pf, Gleb Natapov, (Wed Oct 27, 3:50 am)
Re: [PATCH 7/8] KVM: make async_pf work queue lockless, Gleb Natapov, (Wed Oct 27, 4:41 am)
Re: [PATCH 4/8] KVM: avoid unnecessary wait for a async pf, Xiao Guangrong, (Thu Oct 28, 12:06 am)
Re: [PATCH 6/8] KVM: simply wakup async pf, Xiao Guangrong, (Thu Oct 28, 12:59 am)
Re: [PATCH 7/8] KVM: make async_pf work queue lockless, Xiao Guangrong, (Thu Oct 28, 2:08 am)
Re: [PATCH 7/8] KVM: make async_pf work queue lockless, Gleb Natapov, (Thu Oct 28, 2:14 am)