WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [RFC] grant table API clean up and performancetunin

To: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Subject: Re: [Xen-ia64-devel] [RFC] grant table API clean up and performancetuning memo
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 27 Apr 2006 11:31:44 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 26 Apr 2006 19:31:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200604261344.26748.Tristan.Gingold@xxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <571ACEFD467F7749BC50E0A98C17CDD8094E7A05@pdsmsx403> <200604261344.26748.Tristan.Gingold@xxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Wed, Apr 26, 2006 at 01:44:26PM +0200, Tristan Gingold wrote:
> Le Mardi 28 Mars 2006 15:04, Tian, Kevin a écrit :
> > From: Isaku Yamahata [mailto:yamahata@xxxxxxxxxxxxx]
> >
> > >Sent: 2006年3月28日 20:27
> > >
> > >Without tracking a virtual address corresponding to a granted page,
> > >xen/ia64 have to flush all tlb/vhpt.
> > >I.e. xen/ia64 has to do something like
> > >    vhpt_flush();
> > >    flush_tlb_all();
> > >Here vhpt_flush() flushes the whole of vhpt table.
> > >
> > >On the other hand, dom0 knows the virtual address so
> > >dom0 may issues ptc.ga with page size (16KB by default).
> > >It results in vcpu_ptc_ga() of xen/ia64.
> > >It does
> > >    vhpt_flush_address(vadr,addr_range);
> > >    ia64_global_tlb_purge(vadr,vadr+addr_range,PAGE_SHIFT);
> > >Here vhpt flush range is 16kb.
> > >
> > >If xen/ia64 tracks a virtual address somehow,
> > >Xen/ia64 can flush vhpt with page size range so this become
> > >meaningless.
> >
> > See your point now. :-) So how about pass the virtual address prepared
> > for the granted page in host_addr at mapping time, though it's dom0 to
> > setup mapping right after(or even before) the grant mapping call? By
> > this way, though grant table doesn't setup the va mapping for guest, va is
> > recorded and later you can take that info to do more accurate flush.
> Two questions:
> It seems your mechanism still need to trust the domains.  So we need to add 
> checks for itc/ptc.
> 
> However, can a granted page be mapped several times ?
> If so, tracking is necessary and has a cost.

Grant table API allows it. Xen tracks it by the counter(act->pin).
However current xenLinux maps one-time per a granted page, I believe.


> From my point of view and my experience, flushing all the tlb/vhpt is really 
> costly (and even more with SMP-g), but it is necessary.

The cost is very high.


> Currently, we *don't* flush tlb/vhpt after unmapping granted page.  This 
> really creates instability (at least of gcc segfaults).

My understanding is as follows.
On the current P=M model, only dom0 maps/unmap granted pages.
Because Dom0 accesses a granted page via machine address (given that m=p),
flush isn't necessary.
But the bug is there, there must be something I miss.


> I don't have yet a magic solution.  I think we need to fix gcc segfault bug 
> first, and then we need to improve performance.

I fully agree with you. Bug fix first, tuning next.

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel