public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis_blanchard-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
To: Liu Yu-B13201 <B13201-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	agraf-l3A5Bk7waGM@public.gmane.org
Subject: Re: [PATCH 0/2] kvm/e500v2: MMU optimization
Date: Thu, 09 Sep 2010 09:23:06 -0700	[thread overview]
Message-ID: <4C8909EA.4010701@mentor.com> (raw)
In-Reply-To: <A9833F0F7901024DA08417AA5A9887D91BF248-bKEhWGtIRUJ4Lp7cDGe+DVjVikpgYyvb5NbjCUgZEJk@public.gmane.org>

On 09/09/2010 04:03 AM, Liu Yu-B13201 wrote:
>> -----Original Message-----
>> From: kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> [mailto:kvm-ppc-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org] On Behalf Of Hollis Blanchard
>> Sent: Thursday, September 09, 2010 12:07 AM
>> To: Liu Yu-B13201
>> Cc: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; agraf-l3A5Bk7waGM@public.gmane.org
>> Subject: Re: [PATCH 0/2] kvm/e500v2: MMU optimization
>>
>> On 09/08/2010 02:40 AM, Liu Yu wrote:
>>      
>>> The patchset aims at mapping guest TLB1 to host TLB0.
>>> And it includes:
>>> [PATCH 1/2] kvm/e500v2: Remove shadow tlb
>>> [PATCH 2/2] kvm/e500v2: mapping guest TLB1 to host TLB0
>>>
>>> The reason we need patch 1 is because patch 1 make things
>>>        
>> simple and flexible.
>>      
>>> Only applying patch 1 aslo make kvm work.
>>>        
>> I've always thought the best long-term "optimization" on
>> these cores is
>> to share in the host PID allocation (i.e. __init_new_context()). This
>> way, the TID in guest mappings would not overlap the TID in host
>> mappings, and guest mappings could be demand-faulted rather
>> than swapped
>> wholesale. To do that, you would need to track the host PID
>> in KVM data
>> structures, I guess in the tlbe_ref structure.
>>
>>      
> Hi Hollis,
>
> Guest uses AS=1 and host uses AS=0,
> so even guest uses the same TID with host, they're in different space.
>
> Then why guest needs to care about host TID?
>
>    
You're absolutely right, but this makes a couple key assumptions:
1. The guest doesn't try to use AS=1. This is already false in Linux, 
because the udbg code uses an AS=1 mapping for the UART, but this can be 
configured out (with a small loss in functionality). In non-Linux guests 
the AS=0 restriction could be onerous.
2. A Book E MMU. If we participate in the host "MMU context" allocation, 
the guest -> host address space code could be generalized to include 
e.g. an e600 guest on an e500 host, or vice versa.

So you're right that "optimization" is not the right word; this would be 
more of a functionality and design improvement. (In fact, I suppose it 
could reduce performance on Book E, since AS=1 space actually *is* 
unused by the host. I think it would be worth finding out.)

Hollis Blanchard
Mentor Graphics, Embedded Systems Division

  parent reply	other threads:[~2010-09-09 16:23 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       ` [PATCH 1/2] kvm/e500v2: Remove shadow tlb Hollis Blanchard
2010-09-09 11:16         ` 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 [this message]
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=4C8909EA.4010701@mentor.com \
    --to=hollis_blanchard-nmggyn9qbj3qt0dzr+alfa@public.gmane.org \
    --cc=B13201-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=agraf-l3A5Bk7waGM@public.gmane.org \
    --cc=kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@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