I have a few questions about GPU Direct RDMA

I want to use gpu direct rdma on jetson agx xavier.
So I am making a Linux kernel source by looking at an example.

But I have a few questions.

  1. Is it correct to proceed in the following order to use cuda memory as dma?
    Assign with cudaHostAlloc → cuPointerSetAttribute → nvidia_p2p_get_page → nvidia_p2p_dma_map_page

  2. If I use the nvidia_p2p_dma_map_page function, can I get the physical address of the memory allocated by cudaHostAlloc?
    (Is the hw_address variable in the struct nvidia_p2p_dma_mapping the physical address of the memory allocated by cudaHostAlloc?)

  3. If hw_address is the physical address of the memory allocated by cudaHostAlloc, is it possible to write data to hw_address to write data to cudaDMA?

  4. Why dmam_alloc_coherent in the GPUDirectRDMA example?
    Shouldn’t nvidia_p2p_dma_map_page be used to use cudaDMA?

Help me. thank you


Have you checked the below document before?


Hi, AstaLLL
I have read the documentation.
But I can’t find the answer to question 4.


Did you mean the code below?

The function is for the PCIe device.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.