Whamcloud - gitweb
LU-9810 lnet: prefer Fast Reg 78/28278/5
authorAlexey Lyashkov <alexey.lyashkov@seagate.com>
Mon, 4 Sep 2017 14:25:55 +0000 (17:25 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 13 Sep 2017 03:37:05 +0000 (03:37 +0000)
The FastReg memory model has less CPU overhead than the default.
Therefore prefer it if the HW supports it.  This
applies in particular to the MLX4 HW which supports both memory
models.

Seagate-bug-id: MRP-4508
Test-Parameters: trivial
Signed-off-by: Alexey Lyashkov <alexey.lyashkov@seagate.com>
Change-Id: I09a85a3724d78b61a40fe18c72dbcc4a87da3013
Reviewed-on: https://review.whamcloud.com/28278
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/o2iblnd/o2iblnd.c

index 493e73c..98d3578 100644 (file)
@@ -1656,14 +1656,14 @@ kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t **pp_fpo)
 
        /* Check for FMR or FastReg support */
        fpo->fpo_is_fmr = 0;
-       if (fpo->fpo_hdev->ibh_ibdev->alloc_fmr &&
+       if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) {
+               LCONSOLE_INFO("Using FastReg for registration\n");
+       } else if (fpo->fpo_hdev->ibh_ibdev->alloc_fmr &&
            fpo->fpo_hdev->ibh_ibdev->dealloc_fmr &&
            fpo->fpo_hdev->ibh_ibdev->map_phys_fmr &&
            fpo->fpo_hdev->ibh_ibdev->unmap_fmr) {
                LCONSOLE_INFO("Using FMR for registration\n");
                fpo->fpo_is_fmr = 1;
-       } else if (dev_attr->device_cap_flags & IB_DEVICE_MEM_MGT_EXTENSIONS) {
-               LCONSOLE_INFO("Using FastReg for registration\n");
        } else {
                rc = -ENOSYS;
                LCONSOLE_ERROR_MSG(rc, "IB device does not support FMRs nor FastRegs, can't register memory\n");