Date: Fri, 22 May 2020 18:10:46 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361400 - head/sys/dev/iscsi Message-ID: <202005221810.04MIAkHv060356@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri May 22 18:10:46 2020 New Revision: 361400 URL: https://svnweb.freebsd.org/changeset/base/361400 Log: 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. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl_soft.c ============================================================================== --- head/sys/dev/iscsi/icl_soft.c Fri May 22 18:03:14 2020 (r361399) +++ head/sys/dev/iscsi/icl_soft.c Fri May 22 18:10:46 2020 (r361400) @@ -914,7 +914,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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005221810.04MIAkHv060356>