Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jun 2020 20:42:45 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r361736 - stable/11/sys/dev/iscsi
Message-ID:  <202006022042.052KgjAi056537@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006022042.052KgjAi056537>