From: Alexey Lyashkov Date: Mon, 4 Sep 2017 14:25:55 +0000 (+0300) Subject: LU-9810 lnet: prefer Fast Reg X-Git-Tag: 2.10.53~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8f0d0f052a516a5dd3e588ced6b49c840584855c;p=fs%2Flustre-release.git LU-9810 lnet: prefer Fast Reg 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 Change-Id: I09a85a3724d78b61a40fe18c72dbcc4a87da3013 Reviewed-on: https://review.whamcloud.com/28278 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Olaf Weber Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/o2iblnd/o2iblnd.c b/lnet/klnds/o2iblnd/o2iblnd.c index 493e73c..98d3578 100644 --- a/lnet/klnds/o2iblnd/o2iblnd.c +++ b/lnet/klnds/o2iblnd/o2iblnd.c @@ -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");