Author: mav
Date: Tue Jun 2 20:42:25 2020
New Revision: 361735
URL: https://svnweb.freebsd.org/changeset/base/361735
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/12/sys/dev/iscsi/icl_soft.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/dev/iscsi/icl_soft.c
==============================================================================
--- stable/12/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:40:10 2020
(r361734)
+++ stable/12/sys/dev/iscsi/icl_soft.c Tue Jun 2 20:42:25 2020
(r361735)
@@ -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;
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"