*/
frd->frd_mr = ib_alloc_mr(fpo->fpo_hdev->ibh_pd,
#ifdef IB_MR_TYPE_SG_GAPS
- (dev_caps &
- IBLND_DEV_CAPS_FASTREG_GAPS_SUPPORT) ?
+ ((*kiblnd_tunables.kib_use_fastreg_gaps == 1) &&
+ (dev_caps & IBLND_DEV_CAPS_FASTREG_GAPS_SUPPORT)) ?
IB_MR_TYPE_SG_GAPS :
IB_MR_TYPE_MEM_REG,
#else
IB_MR_TYPE_MEM_REG,
#endif
LNET_MAX_PAYLOAD/PAGE_SIZE);
+ if ((*kiblnd_tunables.kib_use_fastreg_gaps == 1) &&
+ (dev_caps & IBLND_DEV_CAPS_FASTREG_GAPS_SUPPORT))
+ CWARN("using IB_MR_TYPE_SG_GAPS, expect a performance drop\n");
#endif
if (IS_ERR(frd->frd_mr)) {
rc = PTR_ERR(frd->frd_mr);
/* # threads on each CPT */
int *kib_nscheds;
int *kib_wrq_sge; /* # sg elements per wrq */
+ int *kib_use_fastreg_gaps; /* enable discontiguous fastreg fragment support */
} kib_tunables_t;
extern kib_tunables_t kiblnd_tunables;
if ((dev->ibd_dev_caps & IBLND_DEV_CAPS_FASTREG_ENABLED) &&
!(dev->ibd_dev_caps & IBLND_DEV_CAPS_FASTREG_GAPS_SUPPORT) &&
tx->tx_gaps) {
- CERROR("Using FastReg with no GAPS support, but tx has gaps\n");
+ CERROR("Using FastReg with no GAPS support, but tx has gaps. "
+ "Try setting use_fastreg_gaps to 1\n");
return -EPROTONOSUPPORT;
}
module_param(concurrent_sends, int, 0444);
MODULE_PARM_DESC(concurrent_sends, "send work-queue sizing (obsolete)");
+static int use_fastreg_gaps;
+module_param(use_fastreg_gaps, int, 0444);
+MODULE_PARM_DESC(use_fastreg_gaps, "Enable discontiguous fastreg fragment support. Expect performance drop");
+
/*
* map_on_demand is a flag used to determine if we can use FMR or FastReg.
* This is applicable for kernels which support global memory regions. For
.kib_use_priv_port = &use_privileged_port,
.kib_nscheds = &nscheds,
.kib_wrq_sge = &wrq_sge,
+ .kib_use_fastreg_gaps = &use_fastreg_gaps,
};
static struct lnet_ioctl_config_o2iblnd_tunables default_tunables;