[master] a44e0a875 task: Rename TASK_QUEUE_CLIENT to TASK_QUEUE_LIMITED

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Aug 29 13:42:07 UTC 2022


commit a44e0a87526dfb327db222e3760c2effa531d0d9
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Jul 18 17:08:06 2022 +0200

    task: Rename TASK_QUEUE_CLIENT to TASK_QUEUE_LIMITED
    
    This better conveys the role of this macro, and leaves the door open to
    non-client tasks that would be subject to thread_queue_limit.

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index af090b6fe..78e4ecee1 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -218,7 +218,7 @@ enum task_prio {
 };
 
 #define TASK_QUEUE_HIGHEST_PRIORITY TASK_QUEUE_BO
-#define TASK_QUEUE_CLIENT(prio) \
+#define TASK_QUEUE_LIMITED(prio) \
 	(prio == TASK_QUEUE_REQ || prio == TASK_QUEUE_STR)
 
 /*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index 3a5c4bddd..ca09c4f73 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -331,11 +331,9 @@ Pool_Task(struct pool *pp, struct pool_task *task, enum task_prio prio)
 		return (0);
 	}
 
-	/*
-	 * queue limits only apply to client threads - all other
-	 * work is vital and needs do be done at the earliest
+	/* Vital work is always queued.
 	 */
-	if (!TASK_QUEUE_CLIENT(prio) ||
+	if (!TASK_QUEUE_LIMITED(prio) ||
 	    pp->lqueue + pp->nthr < cache_param->wthread_max +
 	    cache_param->wthread_queue_limit) {
 		pp->nqueued++;


More information about the varnish-commit mailing list