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-devel

Re: [Xen-devel] question on iommu _map_page

To: Kaushik Kumar Ram <kaushik@xxxxxxxx>
Subject: Re: [Xen-devel] question on iommu _map_page
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 2 Jul 2010 11:41:21 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 02 Jul 2010 03:56:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8535035.1945A%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcsZrvYx7daGFajWRCCPOYx3FtbBtgAByMmxAAdAr9Y=
Thread-topic: [Xen-devel] question on iommu _map_page
User-agent: Microsoft-Entourage/12.24.0.100205
On 02/07/2010 08:13, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

>> I finally found some time to test your patch. While it seems to fix the
>> problem, it *significantly* degrades performance.
>> On running netperf, there is a 10X reduction in throughput to a guest VM. On
>> profiling, I find a significant number of cycles
>> being spent in mapcount(). In the current solution, the entire grant table is
>> searched every time (right ?). The mapping info
>> ought to be stored in some per-page location... for efficient access.
> 
> It needs to be a per-mapping-domain location. Like the VT-d pte itself.
> Patches welcome.

Scrub that. It would be better to allocate a chunk of otherwised unused
machine address space (e.g., 1GB starting at max(4GB, top_of_ram)), and
allocate each grant entry that needs an iommu mapping a page in that range,
map at that address and return that address as dev_bus_addr from the
grant-map hypercall. Then we would have no IOMMU pte sharing between grants,
and no need for any extra reference counting. Also it would be easy to batch
iommu flushes in this scenario, if you don't care about finished-with grant
mappings being flushed a bit lazily.

 -- Keir



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

<Prev in Thread] Current Thread [Next in Thread>