[openib-general] [kDAPL]How to register a vmalloc() allocated buffer

James Lentini jlentini at netapp.com
Mon Dec 5 08:11:53 PST 2005


> I am doing a simple rdma-read test using the kDAPL. My test is running in
> the kernel model.
> When I allocate both the data source and sink buffers using kmalloc() and
> register the buffers using dat_lmr_kcreate() with memory type
> DAT_MEM_TYPE_PHYSICAL, everything goes well. If the sink buffer is allocated
> with vmalloc() and registered as before, no registering error or rdma read
> DTO completion error occours but
> My questions:
> 1) Could a buffer allocated with vmalloc() be used for a kDAPL rdma reading?
> If so,
> 2) should a buffer of this kind be registered in the same as a buffer
> allocated with kmalloc()?
> 
> Could anyone give some suggestion?
> Thanks very much!

Hi Ian,

An IB HCA needs to be able to DMA the memory used for RDMA read. Since 
vmalloc does not guarantee that the memory it returns can be accessed 
via DMA, you should not use vmalloc.

james



More information about the general mailing list