Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2021 03:01:32 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2cd7a99cebaf - stable/12 - Restore condition removed in df3747c6607b.
Message-ID:  <202103150301.12F31WWO098068@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=2cd7a99cebafb932fc91e5a1c20cde1d4000f4c5

commit 2cd7a99cebafb932fc91e5a1c20cde1d4000f4c5
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2021-03-03 16:58:04 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2021-03-15 02:54:45 +0000

    Restore condition removed in df3747c6607b.
    
    I think it allowed to avoid some TX thread wakeups while the socket
    buffer is full.  But add there another options if ic_check_send_space
    is set, which means socket just reported that new space appeared, so
    it may have sense to pull more data from ic_to_send for better TX
    coalescing.
    
    MFC after:      1 week
    
    (cherry picked from commit aff9b9ee894e3e6b6d8c7e4182d6b973804df853)
---
 sys/dev/iscsi/icl_soft.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c
index d4333b64a77c..d995bedbcb72 100644
--- a/sys/dev/iscsi/icl_soft.c
+++ b/sys/dev/iscsi/icl_soft.c
@@ -912,7 +912,8 @@ icl_send_thread(void *arg)
 			 * This way the icl_conn_send_pdus() can go through
 			 * all the queued PDUs without holding any locks.
 			 */
-			STAILQ_CONCAT(&queue, &ic->ic_to_send);
+			if (STAILQ_EMPTY(&queue) || ic->ic_check_send_space)
+				STAILQ_CONCAT(&queue, &ic->ic_to_send);
 
 			ic->ic_check_send_space = false;
 			ICL_CONN_UNLOCK(ic);



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