From: Hollis Blanchard <hollis_blanchard-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
To: Liu Yu <yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
agraf-l3A5Bk7waGM@public.gmane.org
Subject: Re: [PATCH 1/2] kvm/e500v2: Remove shadow tlb
Date: Wed, 08 Sep 2010 09:06:41 -0700 [thread overview]
Message-ID: <4C87B491.2050002@mentor.com> (raw)
In-Reply-To: <1283938806-2981-2-git-send-email-yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
On 09/08/2010 02:40 AM, Liu Yu wrote:
> It is unnecessary to keep shadow tlb.
> first, shadow tlb keep fixed value in shadow, which make things unflexible.
> second, remove shadow tlb can save a lot memory.
>
> This patch remove shadow tlb and caculate the shadow tlb entry value
> before we write it to hardware.
>
> Also we use new struct tlbe_ref to trace the relation
> between guest tlb entry and page.
Did you look at the performance impact?
Back in the day, we did essentially the same thing on 440. However,
rather than discard the whole TLB when context switching away from the
host (to be demand-faulted when the guest is resumed), we found a
noticeable performance improvement by preserving a shadow TLB across
context switches. We only use it in the vcpu_put/vcpu_load path.
Of course, our TLB was much smaller (64 entries), so the use model may
not be the same at all (e.g. it takes longer to restore a full guest TLB
working set, but maybe it's not really possible to use all 1024 TLB0
entries in one timeslice anyways).
--
Hollis Blanchard
Mentor Graphics, Embedded Systems Division
next prev parent reply other threads:[~2010-09-08 16:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 9:40 [PATCH 0/2] kvm/e500v2: MMU optimization Liu Yu
[not found] ` <1283938806-2981-1-git-send-email-yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2010-09-08 9:40 ` [PATCH 1/2] kvm/e500v2: Remove shadow tlb Liu Yu
2010-09-08 9:40 ` [PATCH 2/2] kvm/e500v2: mapping guest TLB1 to host TLB0 Liu Yu
[not found] ` <1283938806-2981-3-git-send-email-yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2010-09-09 23:24 ` Alexander Graf
[not found] ` <E759E1E3-7457-41B7-B36E-75FA42E107B1-l3A5Bk7waGM@public.gmane.org>
2010-09-15 9:29 ` Alexander Graf
2010-09-16 11:35 ` Liu Yu-B13201
[not found] ` <A9833F0F7901024DA08417AA5A9887D921DD39-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-09-16 11:44 ` Alexander Graf
2010-09-17 8:47 ` Liu Yu-B13201
[not found] ` <A9833F0F7901024DA08417AA5A9887D921DE82-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-09-17 10:19 ` Alexander Graf
2010-09-17 11:28 ` Liu Yu-B13201
[not found] ` <A9833F0F7901024DA08417AA5A9887D921DE99-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-09-17 11:34 ` Alexander Graf
2010-09-17 12:33 ` Liu Yu-B13201
2010-09-17 12:34 ` Alexander Graf
[not found] ` <1283938806-2981-2-git-send-email-yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2010-09-08 16:06 ` Hollis Blanchard [this message]
2010-09-09 11:16 ` [PATCH 1/2] kvm/e500v2: Remove shadow tlb Liu Yu-B13201
[not found] ` <A9833F0F7901024DA08417AA5A9887D91BF24A-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-09-09 18:13 ` Hollis Blanchard
[not found] ` <4C8923D2.5070308-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2010-09-09 23:26 ` Alexander Graf
[not found] ` <C1EBC75A-91B0-49D9-8AD5-571C6BAF22B7-l3A5Bk7waGM@public.gmane.org>
2010-09-09 23:39 ` Hollis Blanchard
2010-09-09 23:42 ` Alexander Graf
2010-09-08 16:07 ` [PATCH 0/2] kvm/e500v2: MMU optimization Hollis Blanchard
[not found] ` <4C87B4AB.7010009-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2010-09-09 11:03 ` Liu Yu-B13201
[not found] ` <A9833F0F7901024DA08417AA5A9887D91BF248-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2010-09-09 16:23 ` Hollis Blanchard
2010-09-10 2:59 ` Liu Yu-B13201
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=4C87B491.2050002@mentor.com \
--to=hollis_blanchard-nmggyn9qbj3qt0dzr+alfa@public.gmane.org \
--cc=agraf-l3A5Bk7waGM@public.gmane.org \
--cc=kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yu.liu-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
/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