linux_dsm_epyc7002/drivers/infiniband/hw/hfi1
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
..
affinity.c IB/hfi1: Add sysfs entry to override SDMA interrupt affinity 2016-08-02 16:00:58 -04:00
affinity.h IB/hfi1: Add sysfs entry to override SDMA interrupt affinity 2016-08-02 16:00:58 -04:00
aspm.h
chip_registers.h IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
chip.c IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
chip.h IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
common.h
debugfs.c
debugfs.h
device.c
device.h
dma.c
driver.c IB/hfi1: Pull FECN/BECN processing to a common place 2016-08-02 16:00:58 -04:00
efivar.c
efivar.h
eprom.c
eprom.h
file_ops.c IB/hfi1: Refine user process affinity algorithm 2016-08-02 15:47:33 -04:00
firmware.c IB/hfi1: Read all firmware versions 2016-08-02 16:00:58 -04:00
hfi.h IB/hfi1: Fix "suspicious rcu_dereference_check() usage" warnings 2016-08-02 16:00:58 -04:00
init.c IB/hfi1: Fix trace message units 2016-08-02 16:00:58 -04:00
intr.c
iowait.h
Kconfig IB/hfi1: Use built-in i2c bit-shift bus adapter 2016-08-02 15:47:42 -04:00
mad.c IB/hfi1: Fix "suspicious rcu_dereference_check() usage" warnings 2016-08-02 16:00:58 -04:00
mad.h IB/hfi1: Clean up port state structure definition 2016-08-02 12:00:54 -04:00
Makefile IB/hfi1: Remove TWSI references 2016-08-02 15:47:42 -04:00
mmu_rb.c
mmu_rb.h
opa_compat.h
pcie.c IB/hfi1: Add static PCIe Gen3 CTLE tuning 2016-08-02 16:00:58 -04:00
pio_copy.c
pio.c IB/hfi1: Fix to fully initialize send context area 2016-08-02 16:00:58 -04:00
pio.h
platform.c IB/hfi1: Correct 8051 link parameter settings 2016-05-26 12:21:10 -04:00
platform.h
qp.c IB/hfi1: Add support for extended memory management 2016-08-02 16:00:58 -04:00
qp.h IB/hfi1: Add hfi1 post send tables 2016-08-02 15:47:44 -04:00
qsfp.c IB/hfi1: Use built-in i2c bit-shift bus adapter 2016-08-02 15:47:42 -04:00
qsfp.h IB/hfi1: Use built-in i2c bit-shift bus adapter 2016-08-02 15:47:42 -04:00
rc.c IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
ruc.c IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
sdma_txreq.h
sdma.c
sdma.h
sysfs.c IB/hfi1: Add sysfs entry to override SDMA interrupt affinity 2016-08-02 16:00:58 -04:00
trace_ctxts.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
trace_dbg.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_ibhdrs.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_misc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rc.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_rx.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
trace_tx.h IB/hfi1: Fix trace sparse errors 2016-08-02 12:00:54 -04:00
trace.c IB/hfi1: Suppress sparse warnings 2016-06-06 19:37:23 -04:00
trace.h IB/hfi1: Separate tracepoints into specific headers 2016-08-02 12:00:54 -04:00
uc.c IB/rdmavt, hfi1: Fix NFSoRDMA failure with FRMR enabled 2016-08-02 16:00:58 -04:00
ud.c IB/hfi1: Pull FECN/BECN processing to a common place 2016-08-02 16:00:58 -04:00
user_exp_rcv.c
user_exp_rcv.h
user_pages.c
user_sdma.c IB/hfi1: Improve SDMA engine assignment for user SDMA 2016-08-02 15:47:43 -04:00
user_sdma.h
verbs_txreq.c IB/hfi1: Fix deadlock with txreq allocation slow path 2016-06-23 10:16:15 -04:00
verbs_txreq.h IB/hfi1: Fix deadlock with txreq allocation slow path 2016-06-23 10:16:15 -04:00
verbs.c IB/hfi1: Add support for extended memory management 2016-08-02 16:00:58 -04:00
verbs.h