linux/include/rdma
Jianxin Xiong d9b13c2030 IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled
Hanging has been observed while writing a file over NFSoRDMA. Dmesg on
the server contains messages like these:

[  931.992501] svcrdma: Error -22 posting RDMA_READ
[  952.076879] svcrdma: Error -22 posting RDMA_READ
[  982.154127] svcrdma: Error -22 posting RDMA_READ
[ 1012.235884] svcrdma: Error -22 posting RDMA_READ
[ 1042.319194] svcrdma: Error -22 posting RDMA_READ

Here is why:

With the base memory management extension enabled, FRMR is used instead
of FMR. The xprtrdma server issues each RDMA read request as the following
bundle:

(1)IB_WR_REG_MR, signaled;
(2)IB_WR_RDMA_READ, signaled;
(3)IB_WR_LOCAL_INV, signaled & fencing.

These requests are signaled. In order to generate completion, the fast
register work request is processed by the hfi1 send engine after being
posted to the work queue, and the corresponding lkey is not valid until
the request is processed. However, the rdmavt driver validates lkey when
the RDMA read request is posted and thus it fails immediately with error
-EINVAL (-22).

This patch changes the work flow of local operations (fast register and
local invalidate) so that fast register work requests are always
processed immediately to ensure that the corresponding lkey is valid
when subsequent work requests are posted. Local invalidate requests are
processed immediately if fencing is not required and no previous local
invalidate request is pending.

To allow completion generation for signaled local operations that have
been processed before posting to the work queue, an internal send flag
RVT_SEND_COMPLETION_ONLY is added. The hfi1 send engine checks this flag
and only generates completion for such requests.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-08-02 16:00:58 -04:00
..
ib_addr.h net: rdma: use __ethtool_get_ksettings 2016-02-25 22:06:46 -05:00
ib_cache.h IB/core: Add gid_type to gid attribute 2015-12-23 10:35:10 -05:00
ib_cm.h IB/cm: Remove compare_data checks 2015-08-30 15:48:24 -04:00
ib_fmr_pool.h RDMA: Improve include file coding style 2008-07-14 23:48:44 -07:00
ib_mad.h IB/core: Introduce capabilitymask2 field in ClassPortInfo mad 2016-05-25 15:39:02 -04:00
ib_marshall.h RDMA/cma: Export rdma cm interface to userspace 2006-12-12 11:50:22 -08:00
ib_pack.h ib_pack.h: Add opcode definition for send with invalidate 2016-05-13 19:39:19 -04:00
ib_pma.h IB/core: Display extended counter set if available 2015-12-23 15:58:30 -05:00
ib_sa.h IB/SA Agent: Add support for SA agent get ClassPortInfo 2016-05-25 15:39:02 -04:00
ib_smi.h IB/core: Move SM class defines from ib_mad.h to ib_smi.h 2015-09-03 15:50:32 -04:00
ib_umem_odp.h IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
ib_umem.h IB/core: Add support for on demand paging regions 2014-12-15 18:13:36 -08:00
ib_verbs.h IB/core: Make all casts in ib_device_cap_flags enum consistent 2016-06-07 09:50:55 -04:00
ib.h IB/security: Restrict use of the write() interface 2016-04-28 12:03:16 -04:00
iw_cm.h iwcm: common code for port mapper 2016-03-16 13:47:52 -04:00
iw_portmap.h RDMA/core: Enable the iWarp Port Mapper to provide the actual address of the connecting peer to its clients 2015-05-05 09:18:01 -04:00
mr_pool.h IB/core: add a simple MR pool 2016-05-13 13:37:18 -04:00
opa_port_info.h IB/hfi1: Clean up port state structure definition 2016-08-02 12:00:54 -04:00
opa_smi.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
rdma_cm_ib.h RDMA: Fix license text 2008-07-14 23:48:43 -07:00
rdma_cm.h IB/core, cma: Make __attribute_const__ declarations sparse-friendly 2015-10-30 17:57:49 -04:00
rdma_netlink.h IB/core: Add rdma netlink helper functions 2015-08-30 18:12:25 -04:00
rdma_vt.h IB/hfi1: Add the capability for reserved operations 2016-08-02 16:00:58 -04:00
rdmavt_cq.h IB/rdmavt: Add completion queue functions 2016-03-10 20:37:24 -05:00
rdmavt_mr.h IB/rdmavt: Add mechanism to invalidate MR keys 2016-08-02 16:00:58 -04:00
rdmavt_qp.h IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
rw.h IB/core: add RW API support for signature MRs 2016-05-13 13:37:20 -04:00