User Manual
Rev 2.3-1.0.1
Mellanox Technologies
153
The following are environment variables that can be 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 dis-
ables the allocator
•
CONTIG - Forces the usage of the contiguous pages allo-
cator. If contiguous pages are not available the alloca-
tion 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
3.2.7.2 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
mode to that MR. The desired access is validated against its given permissions and upon
successful creation, the physical pages of the original MR are shared by the new MR.
Once the MR is shared, it can be used even if the original MR was destroyed.