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

[Xen-devel] Re: mthca use of dma_sync_single is bogus

To: Lukas Hejtmanek <xhejtman@xxxxxxxxxxx>
Subject: [Xen-devel] Re: mthca use of dma_sync_single is bogus
From: Roland Dreier <rdreier@xxxxxxxxx>
Date: Tue, 10 Jul 2007 12:24:02 -0700
Authentication-results: sj-dkim-3; header.From=rdreier@xxxxxxxxx; dkim=pass ( sig from cisco.com/sjdkim3002 verified; );
Cc: Keir Fraser <keir@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxxxxxx>, general@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 17 Jul 2007 05:03:01 -0700
Dkim-signature: v=0.5; a=rsa-sha256; q=dns/txt; l=1040; t=1184095447; x=1184959447; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@xxxxxxxxx; z=From:=20Roland=20Dreier=20<rdreier@xxxxxxxxx> |Subject:=20Re=3A=20mthca=20use=20of=20dma_sync_single=20is=20bogus |Sender:=20; bh=yPZxp0CDPyuhnYDvFmbcSacIeS+rvPoRsNw2ClZfPFs=; b=cCH6LmiIAlANEw/2mtk9sV3i3G/M8oeNK7dTY3lYTXWzfgEwQlFvK8vyLV9gim6oHRVQ/RBs P1zQwYTfNWpex04mPeotwkmJLvc9YQGOuhprp+94AOm0Rx+padtM7+Zk;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070710191639.GL3885@xxxxxxxxxxx> (Lukas Hejtmanek's message of "Tue, 10 Jul 2007 21:16:39 +0200")
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <adalkdpxopo.fsf@xxxxxxxxx> <20070709213913.GB20052@xxxxxxxxxxxxxx> <adamyy4vjo9.fsf@xxxxxxxxx> <20070710141409.GH3885@xxxxxxxxxxx> <ada7ip8b0be.fsf@xxxxxxxxx> <20070710190018.GK3885@xxxxxxxxxxx> <adak5t89iv8.fsf@xxxxxxxxx> <20070710191639.GL3885@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.20 (linux)
 > > coherent and consistent are synonyms.  It's confusing because there is
 > > pci_alloc_consistent(), which is in general just a wrapper for
 > > dma_alloc_coherent().
 > 
 > According to DMA-mapping.txt they are not. Alpha, M68000 wihtout MMU, PPC,
 > Sparc, Sparc64, V850 have own implementation of pci_alloc_consistent().
 > 
 > Yes, on i386, the pci_alloc_consistent() is just wrapper for
 > dma_alloc_coherent().

Sorry, I was a little confusing.  The implementations may be different
but in general there is no real difference between consistent and
coherent memory.  Using either pci_alloc_consistent() or
dma_alloc_coherent() will exhaust the same small pool of address space
on powerpc 4xx for example.

 > So, what about some #ifdefs ? E.g., allow config option - Xen optimizations?

Seems pretty ugly, especially given that Xen is not upstream.  I think
the Xen tree should just carry such patches, at least until Xen is
merged.  Even then I'm quite dubious about having two code paths for this.

 - R.

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

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