I have supplementary processes which should exchange files over IB network. Then the files will be used by other processes.
The workflow is following:
- Create files in /dev/shm
- Resize files appropriately
- Map files in process' VM
- Register mmaped area with ibv_reg_mr
- Initiate RDMA operation for data transfer
It turned out that the bottleneck in my scheme is ib_reg_mr (I measured separately registering 3Gb memory takes 1.78 seconds). It seems that it triggers mapping of the memory region to the process's address space. Unfortunately, this operation is not needed, because the receiving process does not use this memory. The memory should be mapped and used by other processes later.
So I thought it would be wise to circumvent altering page tables for the receiving process, but I was not able to find if it is possible at all.
Could you advise me, if there is a way to initiate a data transfer on a memory region without mapping it to process' address space?