[openib-general] [PATCH 5/6] [RFC] iser handling of memory for RDMA
Or Gerlitz
ogerlitz at voltaire.com
Sun Feb 26 05:04:43 PST 2006
Christoph Hellwig wrote:
> dma_map_page/dma_map_sg map from page frames to bus addresses. There
> is no need for the pages to mapped into kernel virtual memory at all.
> E.g. the simple non-iommu implementation of dma_map_page on i386 does
> the following:
>
> static inline dma_addr_t
> dma_map_page(struct device *dev, struct page *page, unsigned long offset,
> size_t size, enum dma_data_direction direction)
> {
> BUG_ON(direction == DMA_NONE);
> return page_to_phys(page) + offset;
> }
>
> it doesn't involve kernel virtual addresses at all, just a struct page
> and it's physical address. For more complex schemes the physical
> address needs to be translated to a bus address, but there's not
> requirement for the page to be mapped into kva. For example direct I/O
> on filesystems or block devices will send down pages not mapped into KVA
> to the scsi subsystem.
thanks a lot for taking the time and putting this detailed explanation,
now i understand it much better.
Or.
More information about the general
mailing list