From 8f0d0f052a516a5dd3e588ced6b49c840584855c Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Mon, 4 Sep 2017 17:25:55 +0300 Subject: [PATCH] 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 --- lnet/klnds/o2iblnd/o2iblnd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"); -- 1.8.3.1