Physical Address Memory Allocation
Physical Address Memory Region (PA-MR) allows for managing physical memory used for posting send and receive requests. This can benefit the performance of applications that register large memory regions with random access.
When working with a physical address memory region (PA-MR), the memory region that is used must be:
A continuous address space in physical memory
One way of allocating physical memory is by using Linux huge pages, which reserve a non-swappable, continuous physical address space. Access to this memory can be done using the mmap system call.
There are multiple methods of translating the returned virtual address from mmap to the physical address. Using a physical memory region and supplying the physical address when posting requests improve the random access performance since no conversion from a virtual address to a physical address is needed.
When using PA-MR, users bypass the memory protection kernel mechanism, which might crash the system when used incorrectly. This feature is recommended for experienced users with an understanding of the possible risks.
In order to enable Physical Memory Regions:
PA-MR is not enabled by default in MLNX_OFED. MLNX_OFED sources should be recompiled using the following configuration flag:
Physical Address memory registration is done using ibv_exp_reg_mr verb. For more information, please refer to the verb's manual page.
For further information, please refer to PhysicalAddressMemoryRegion Community post.