From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roland Dreier Subject: [ofa-general] Re: mthca use of dma_sync_single is bogus Date: Tue, 10 Jul 2007 12:24:02 -0700 Message-ID: References: <20070709213913.GB20052@mellanox.co.il> <20070710141409.GH3885@ics.muni.cz> <20070710190018.GK3885@ics.muni.cz> <20070710191639.GL3885@ics.muni.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <20070710191639.GL3885@ics.muni.cz> (Lukas Hejtmanek's message of "Tue, 10 Jul 2007 21:16:39 +0200") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org To: Lukas Hejtmanek Cc: Keir Fraser , xen-devel@lists.xensource.com, "Michael S. Tsirkin" , general@lists.openfabrics.org List-Id: xen-devel@lists.xenproject.org > > 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.