numam-spdk/lib/iscsi
Jim Harris 611e2f7823 iscsi: fix hang on high QD large reads
We throttle the number of data_in operations per
connection.  Currently after a read is completed,
we try to send more data_in operations since one
has just been completed.

But we are trying to send more too early.  The data_in_cnt
doesn't actually get decremented until after the PDU is
written on the socket.  So this results in a case
where data_in_cnt == 64, and all 64 read operations
complete before any of those 64 are actually transmitted
onto the TCP socket.  There are no more read operations
waiting, so we won't try to handle the data_in list
again, and if none of these 64 resulted in a SCSI
command completing, then the initiator may not send us
any more read I/O which would have also kicked the data_in
list.

So the solution is to kick the data_in list after the
PDU has been written - not after a read I/O is completed
back from the SCSI layer.

Signed-off-by: Jim Harris <james.r.harris@intel.com>

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455454 (master)

(cherry picked from commit 59a1fbe937)
Change-Id: Ia01cf96e8eb6e08ddcaaeff449386e78de7c5bc5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457271
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2019-06-16 14:44:50 +00:00
..
acceptor.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
acceptor.h iscsi: login poller per portal and portal cache 2017-10-06 17:00:45 -04:00
conn.c iscsi: fix hang on high QD large reads 2019-06-16 14:44:50 +00:00
conn.h lib/scsi: Add lun to the names of descriptors and callback for LUN 2019-04-22 16:00:42 +00:00
init_grp.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
init_grp.h iscsi: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
iscsi_rpc.c lib/iscsi: Make iscsi_shutdown_tgt_node_by_name asynchronous 2019-04-22 16:00:42 +00:00
iscsi_subsystem.c iscsi: fix double free when failed to start target 2019-06-16 14:44:50 +00:00
iscsi.c iscsi: suppress successful iscsi logout notifications 2019-04-22 16:44:42 +00:00
iscsi.h iscsi: Skip metadata space in read or write data from network socket 2019-03-13 01:40:02 +00:00
Makefile mk: add framework for defining inter-lib dependencies 2018-11-01 21:25:55 +00:00
md5.c astyle: enforce braces around single-line statements 2017-12-11 11:19:32 -05:00
md5.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
param.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
param.h include: Move the remainder of the code base to stdinc.h 2017-05-08 13:20:36 -07:00
portal_grp.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
portal_grp.h iscsi: Use not C++ style comments // but C-style comments /* */ 2018-10-31 22:01:47 +00:00
task.c iscsi: Remove the prefix spdk_ from names of private functions 2019-04-01 00:52:56 +00:00
task.h iscsi: Propagate SCSI error status to split SCSI read/write commands 2018-12-11 16:37:55 +00:00
tgt_node.c lib/scsi: Make spdk_scsi_dev_destruct asynchronous 2019-04-22 18:22:59 +00:00
tgt_node.h lib/iscsi: Make iscsi_tgt_node_destruct asynchronous 2019-04-22 16:00:42 +00:00