[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH-REWORKED] Added xen_is_contiguous_region


  • To: Jambunathan K <kjambunathan@xxxxxxxxx>
  • From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • Date: Fri, 13 Apr 2007 22:18:39 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 13 Apr 2007 14:16:02 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: Acd+EU3ojJNrJuoEEduH7gAWy6hiGQ==
  • Thread-topic: [Xen-devel] [PATCH-REWORKED] Added xen_is_contiguous_region

On 13/4/07 20:56, "Jambunathan K" <kjambunathan@xxxxxxxxx> wrote:

Using the new xen_is_contiguous_region() would enable our driver to fall back upon it's own pool.

This is my first patch to Xen. If you approve of the patch, I will resubmit the changes as required by you.

You can check whether a memory region straddles a page boundary yourself without needing an external helper function. Also you should have a pretty good idea whether a piece of memory you allocated will pass the contiguous_bitmap test: if you called pci_alloc_consistent(), or xen_create_contiguous_region(), then it will; if you simply kmalloc()ed or get_free_pages()ed a region then it will not. If you are getting buffers passed to you from elsewhere in the kernel, I guess it depends what kind of device you’re talking about, but it’s pretty likely to be the case that if you are passed page-straddling buffers that you are going to need to use a bounce buffer.

But anyway — I thought the issue was your DMA limit of 32GB? Why should page-straddling buffers be a problem at all: your hardware probably supports scatter-gather DMA, right?

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.