[openib-general] Re: [kDAPL]questions about the LMR creation of different types of memory

Ian Jiang ianjiang.ict at gmail.com
Thu Dec 8 17:42:56 PST 2005


On 12/9/05, James Lentini <jlentini at netapp.com> wrote:

> ian> 1) Could memory allocated by kmem_cache_create() be OK?
> ian> AFAIK, memory allocated by kmalloc() is OK and that by vmalloc()
> ian> is not.
>
> Correct, assuming you pass kmalloc the GFP_DMA flag.


Roland> No, the GFP_DMA flag is not necessary.  On x86 is means to allocate
Roland> from the 24-bit ISA DMA region (ie the low 16 MB of RAM).  In
general
Roland> it is never necessary to use GFP_DMA in modern code.

I agree with Roland. I tried the kmalloc() with GFP_ATOMIC flag and it was
OK.

ian> and it's not necessary for the DAT_MEM_TYPE_IA type. Is the
> ian> translation is done in the dat_lmr_kcreate() for the
> ian> DAT_MEM_TYPE_IA type?
>
> No translation is done in dat_lmr_kcreate for DAT_MEM_TYPE_IA. A
> DAT_MEM_TYPE_IA address is supposed to be an I/O address that the
> adapter can use.



Question 1: How to distinguish a address that the adapter can use from that
the adapter cannot use?
Could you give an example? I am really not very familiar with the I/O
address details.

Question 2: Which memory type should be use given a continuous range of
physical memory?
It seems simpler to use the DAT_MEM_TYPE_IA type since no translation is
needed. But is not there any limitation to the memory to be registered using
the DAT_MEM_TYPE_IA, contrasted with the DAT_MEM_PHYSICAL type?

Thanks a lot!
--
Ian Jiang
ianjiang.ict at gmail.com

Laboratory of Spatial Information Technology
Division of System Architecture
Institute of Computing Technology
Chinese Academy of Sciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20051209/50ae4a33/attachment.html>


More information about the general mailing list