svn commit: r361736 - stable/11/sys/dev/iscsi

Alexander Motin mav at FreeBSD.org
Tue Jun 2 20:42:46 UTC 2020


Author: mav
Date: Tue Jun  2 20:42:45 2020
New Revision: 361736
URL: https://svnweb.freebsd.org/changeset/base/361736

Log:
  MFC 361400: Do not try to fill socket send buffer to the last byte.
  
  Setting so_snd.sb_lowat to at least 1/8 of the socket buffer size allows
  send thread more actively use PDUs coalescing, that dramatically reduces
  TCP lock congestion and number of context switches, when the socket is
  full and PDUs are small.

Modified:
  stable/11/sys/dev/iscsi/icl_soft.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/11/sys/dev/iscsi/icl_soft.c	Tue Jun  2 20:42:25 2020	(r361735)
+++ stable/11/sys/dev/iscsi/icl_soft.c	Tue Jun  2 20:42:45 2020	(r361736)
@@ -913,7 +913,8 @@ icl_conn_send_pdus(struct icl_conn *ic, struct icl_pdu
 				    "have %ld, need %ld",
 				    available, size);
 #endif
-				so->so_snd.sb_lowat = size;
+				so->so_snd.sb_lowat = max(size,
+				    so->so_snd.sb_hiwat / 8);
 				SOCKBUF_UNLOCK(&so->so_snd);
 				return;
 			}


More information about the svn-src-all mailing list