kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: PPC: Book3S HV: Optimize for MMIO emulation
@ 2016-11-04  5:55 Yongji Xie
  2016-11-04  5:55 ` [PATCH v2 1/2] KVM: PPC: Book3S HV: Clear the key field of HPTE when the page is paged out Yongji Xie
  2016-11-04  5:55 ` [PATCH v2 2/2] KVM: PPC: Book3S HV: Add a per vcpu cache for recently page faulted MMIO entries Yongji Xie
  0 siblings, 2 replies; 5+ messages in thread
From: Yongji Xie @ 2016-11-04  5:55 UTC (permalink / raw)
  To: kvm-ppc, kvm; +Cc: paulus, zhong

Today, for each emulated MMIO operation, there is a long path from
page fault to kvmppc_hv_emulate_mmio(), include looking up Hash Page
Table, locking HPTE twice and searching mmio gfn from memslots.

This series introduced a cache mechanism for MMIO HPTEs to shorten
the path, which will improve the IO performance of emulated device,
especially virtio device. Because currently almost all of virtio
nofications(Port IO access) will hit the same HPTE.

In this series, patch 1 fixed a bug on key field of HPTE; patch 2
implemented the per vcpu cache for recently page faulted MMIO
entries.

The performance test result:

FIO(null_blk, iops)
===========================

    Before	After
1st 32095	32616
2nd 32032	32635
3rd 32057	32638
4th 32005	32598
5th 32069	32628

NetPerf(TCP_RR, Trans.Rate per sec)
===========================

    Before	After
1st 30734.66	31328.63
2nd 30749.26	31337.77
3rd 30825.99	31278.19
4th 30708.94	31350.81
5th 30832.35	31484.80 

Changelog v2:
- Fix a bug of the function is_mmio_hpte()
- Add some performance test results

Yongji Xie (2):
  KVM: PPC: Book3S HV: Clear the key field of HPTE when the page is paged out
  KVM: PPC: Book3S HV: Add a per vcpu cache for recently page faulted MMIO entries

 arch/powerpc/include/asm/kvm_host.h |   21 ++++++
 arch/powerpc/kvm/book3s_64_mmu_hv.c |   20 ++++++-
 arch/powerpc/kvm/book3s_hv.c        |    9 +++
 arch/powerpc/kvm/book3s_hv_rm_mmu.c |  122 +++++++++++++++++++++++++++++------
 4 files changed, 151 insertions(+), 21 deletions(-)


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

end of thread, other threads:[~2016-11-21  5:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04  5:55 [PATCH v2 0/2] KVM: PPC: Book3S HV: Optimize for MMIO emulation Yongji Xie
2016-11-04  5:55 ` [PATCH v2 1/2] KVM: PPC: Book3S HV: Clear the key field of HPTE when the page is paged out Yongji Xie
2016-11-21  5:06   ` Paul Mackerras
2016-11-04  5:55 ` [PATCH v2 2/2] KVM: PPC: Book3S HV: Add a per vcpu cache for recently page faulted MMIO entries Yongji Xie
2016-11-21  5:06   ` Paul Mackerras

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).