User Manual

Driver FeaturesRev 2.2-1.0.1
Mellanox Technologies
106
address field of the struct ibv_mr will hold the address to the allocated memory block. This block
will be freed implicitly when the
ibv_dereg_mr() is called.
The following are environment variables that can be used to control error cases / contiguity:
Table 6 - Parameters Used to Control Error Cases / Contiguity
Parameters Description
MLX_MR_ALLOC_TYPE
Configures the allocator type.
ALL (Default) - Uses all possible allocator and selects most
efficient allocator.
ANON - Enables the usage of anonymous pages and disables
the allocator
CONTIG - Forces the usage of the contiguous pages allocator.
If contiguous pages are not available the allocation fails
MLX_MR_MAX_LOG2_CONTIG_BSIZE
Sets the maximum contiguous block size order.
Values: 12-23
Default: 23
MLX_MR_MIN_LOG2_CONTIG_BSIZE
Sets the minimum contiguous block size order.
Values: 12-23
Default: 12
4.12 Shared Memory Region
Shared Memory Region is only applicable to the mlx4 driver.
Shared Memory Region (MR) enables sharing MR among applications by implementing the
"Register Shared MR" verb which is part of the IB spec.
Sharing MR involves the following steps:
Step 1. Request to create a shared MR
The application sends a request via the
ibv_exp_reg_mr API to create a shared MR. The
application supplies the allowed sharing access to that MR. If the MR was created suc-
cessfully, a unique MR ID is returned as part of the struct
ibv_mr which can be used by
other applications to register with that MR.
The underlying physical pages must not be Least Recently Used (LRU) or Anonymous.
T
o disable that, you need to turn on the
IBV_EXP_ACCESS_ALLOCATE_MR bit as part of the
sharing bits.
Usage:
Turns on via the ibv_exp_reg_mr one or more of the sharing access bits. The sharing bits are part of
the ibv_exp_reg_mr man page.
Turns on the IBV_EXP_ACCESS_ALLOCATE_MR bit
Step 2. Request to register to a shared MR
A new verb called
ibv_exp_reg_shared_mr is added to enable sharing an MR. To use this
verb, the application supplies the MR ID that it wants to register for and the desired access