From b13941f635c3119eb02dc29b5248066f934f76be Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Mon, 12 Sep 2005 21:01:28 -0500 Subject: [PATCH] [SCSI] iscsi: nodelay fix From: tomof@acm.org I'm not sure about this. I don't think that NODELAY option hurts performance. However, open-iscsi does not use MSG_MORE properly with sendpage, so NODELAY option hurts the open-iscsi performance. I've attached a patch to fix NODELAY and MSG_MORE problems and the write performance results with disktest. I use Opteron boxes connected directly, Chelsio NICs, 1500-byte MTU, 64 KB I/O size, and the iSCSI parameters on open-iscsi web site. With only NODELAY fix, the performance drops, as you said. On the other hand, NODELAY and MSG_MORE fixes improve the performance overall. Signed-off-by: Alex Aizman Signed-off-by: Dmitry Yusupov Signed-off-by: Mike Christie Signed-off-by: James Bottomley --- drivers/scsi/iscsi_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 810e5e5965..584e51024f 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -1385,7 +1385,7 @@ iscsi_sendpage(struct iscsi_conn *conn, struct iscsi_buf *buf, BUG_ON(buf->sent + size > buf->sg.length); if (size > *count) size = *count; - if (buf->sent + size != buf->sg.length) + if (buf->sent + size != buf->sg.length || *count != size) flags |= MSG_MORE; res = iscsi_send(sk, buf, size, flags); -- 2.39.5