[master] 18f5acc38 Use the REQ priority for incoming connection tasks by the acceptor

Martin Blix Grydeland martin at varnish-software.com
Mon Mar 1 17:39:08 UTC 2021


commit 18f5acc38af156f9b77c15a898178da3a92f59bf
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Feb 17 13:39:37 2021 +0100

    Use the REQ priority for incoming connection tasks by the acceptor
    
    When accepting new incoming connections in the acceptor thread, it would
    schedule, they would be registered with the VCA priority. This priority is
    reserved for the acceptor thread itself, and specifically is not included
    in the TASK_QUEUE_CLIENT categorisation. This would interfere with the
    thread reserve pools.
    
    t02011.vtc had to be adjusted to account for the new priority
    categorisation of the initial request.

diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 471ecc824..ae4da2f84 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -516,7 +516,7 @@ vca_accept_task(struct worker *wrk, void *arg)
 
 		wa.acceptsock = i;
 
-		if (!Pool_Task_Arg(wrk, TASK_QUEUE_VCA,
+		if (!Pool_Task_Arg(wrk, TASK_QUEUE_REQ,
 		    vca_make_session, &wa, sizeof wa)) {
 			/*
 			 * We couldn't get another thread, so we will handle
diff --git a/bin/varnishtest/tests/t02011.vtc b/bin/varnishtest/tests/t02011.vtc
index 6991e1025..88c64d904 100644
--- a/bin/varnishtest/tests/t02011.vtc
+++ b/bin/varnishtest/tests/t02011.vtc
@@ -20,8 +20,8 @@ server s1 {
 # at this point, so when we try to get a second stream, we fail.
 
 varnish v1 -cliok "param.set thread_pools 1"
-varnish v1 -cliok "param.set thread_pool_min 5"
-varnish v1 -cliok "param.set thread_pool_max 5"
+varnish v1 -cliok "param.set thread_pool_min 6"
+varnish v1 -cliok "param.set thread_pool_max 6"
 varnish v1 -cliok "param.set thread_queue_limit 0"
 varnish v1 -cliok "param.set thread_stats_rate 1"
 varnish v1 -cliok "param.set feature +http2"
@@ -66,10 +66,10 @@ client c1 {
 } -run
 
 # trigger an update of the stats
-varnish v1 -cliok "param.set thread_pool_max 6"
-varnish v1 -cliok "param.set thread_pool_min 6"
+varnish v1 -cliok "param.set thread_pool_max 7"
+varnish v1 -cliok "param.set thread_pool_min 7"
 delay 1
-varnish v1 -cliok "param.set thread_pool_min 5"
+varnish v1 -cliok "param.set thread_pool_min 6"
 delay 1
 varnish v1 -vsl_catchup
 varnish v1 -expect sess_dropped == 0


More information about the varnish-commit mailing list