From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: xen_create_contiguous_region - Regarding Date: Mon, 09 Apr 2007 18:47:36 +0530 Message-ID: <461A3CF0.7020406@netxen.com> References: <4616430F.2030507@netxen.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4616430F.2030507@netxen.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jambunathan K Cc: xen-devel@lists.xensource.com, sanjeev@netxen.com List-Id: xen-devel@lists.xenproject.org Given that our driver supports 35-bit mask, the fact that xen_create_contiguous_region constrains "machine contiguous" allocations to less than dma_bits seems very limiting. What would be the recommended way to get machine contiguous pages within say (1<<35)? Regards, Jambunathan K. Jambunathan K wrote: >>> pci_map_single() will do what you want automatically. If you really want to >>> allocate contiguous memory yourself, allocate it then call >>> xen_create_contiguous_region(). > > Could you please export xen_create_contiguous_region for wider use? > > Jambunathan K. > > > Keir Fraser wrote: >> On 6/4/07 11:46, "Jambunathan K" wrote: >> >>> Given that we prefer to maintain our own bounce buffers, I could neither >>> find a dependable API that let the driver allocate machine contiguous >>> memory (that could later be *pci_map_singled*) nor find a suitable hook >>> to xen_create_contiguous_region. >> pci_map_single() will do what you want automatically. If you really want to >> allocate contiguous memory yourself, allocate it then call >> xen_create_contiguous_region(). >> >>> As an aside, is there a tweak to "increase" contiguous memory regions >>> available so that xen_create_contiguous_regions() succeeds. On DomUs, >>> when swiotlb is enabled, I see some crashes which I would like to avoid >>> by redistributing memory resources. >> Xen will try to maintain contiguity as far as possible, but it cannot >> defragment the memory map. >> >> -- Keir >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > >