From: Paul Mackerras <paulus@ozlabs.org>
To: Yongji Xie <xyjxie@linux.vnet.ibm.com>
Cc: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, zhong@linux.vnet.ibm.com
Subject: Re: [PATCH v2 2/2] KVM: PPC: Book3S HV: Add a per vcpu cache for recently page faulted MMIO entries
Date: Mon, 21 Nov 2016 16:06:30 +1100 [thread overview]
Message-ID: <20161121050630.GL26748@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1478238912-30680-3-git-send-email-xyjxie@linux.vnet.ibm.com>
On Fri, Nov 04, 2016 at 01:55:12PM +0800, Yongji Xie wrote:
> This keeps a per vcpu cache for recently page faulted MMIO entries.
> On a page fault, if the entry exists in the cache, we can avoid some
> time-consuming paths, for example, looking up HPT, locking HPTE twice
> and searching mmio gfn from memslots, then directly call
> kvmppc_hv_emulate_mmio().
>
> In current implenment, we limit the size of cache to four. We think
> it's enough to cover the high-frequency MMIO HPTEs in most case.
> For example, considering the case of using virtio device, for virtio
> legacy devices, one HPTE could handle notifications from up to
> 1024 (64K page / 64 byte Port IO register) devices, so one cache entry
> is enough; for virtio modern devices, we always need one HPTE to handle
> notification for each device because modern device would use a 8M MMIO
> register to notify host instead of Port IO register, typically the
> system's configuration should not exceed four virtio devices per
> vcpu, four cache entry is also enough in this case. Of course, if needed,
> we could also modify the macro to a module parameter in the future.
>
> Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com>
Thanks, applied to kvm-ppc-next.
Paul.
prev parent reply other threads:[~2016-11-21 5:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161121050630.GL26748@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=xyjxie@linux.vnet.ibm.com \
--cc=zhong@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).