[rds-devel] dma_sync [was: Has anyone tried RDS on IA64 Linux?]

Or Gerlitz ogerlitz at voltaire.com
Tue May 6 06:32:36 PDT 2008


Olaf Kirch wrote:
>> I see, in that case you also sync the buffer over which the next 
>> fragment is going to be received before/during its reception by the HCA, 
>> I think this is not allowed either.
> Why isn't that allowed?
If you require the memory pointed by this fragment to be in sync for the 
device to use, you can't sync it for the cpu before the device has used 
it, which is what happens in the current code when the reception of the 
first fragment causes a sync for the cpu for all fragments of this page, 
correct?
>
>> Maybe the way to go here is to move into doing dma_map/sync in a single 
>> fashion over each fragment and not over pages which were carved to 
>> fragments, etc?
>
> You mean rather than using dma_map_page once on the page and using
> dma address+offset, we should call dma_map_page() with the appropriate
> offset for each fragment? That would work, too, and save us the hassles
> with dma_sync - where I'm now calling dma_sync, I'd just unmap
> the fragment instead.
Yes calling dma_map_page multiple times (eg twice when there are two 2K 
fragment for a 4K page) would work. Initially I was thinking that you 
can can use dma_map_single for each fragment, but looking on the code I 
see now that you don't maintain a kernel virtual address mapping for a 
page and only do that (call kmap()) when the page is about to be copied 
to user space.

Or





More information about the rds-devel mailing list