[master] 64ae2ad Make the maximum number of thread pools a compile time parameter.

Poul-Henning Kamp phk at FreeBSD.org
Tue Apr 5 12:13:05 CEST 2016


commit 64ae2adce3f748392732e2f9f7c928928fc7df41
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Apr 4 21:01:26 2016 +0000

    Make the maximum number of thread pools a compile time parameter.

diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index eb20956..7b6a6b8 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -42,6 +42,10 @@
 
 /**********************************************************************/
 
+#if !defined(MAX_THREAD_POOLS)
+#  define MAX_THREAD_POOLS 32
+#endif
+
 /* Name of transient storage */
 #define TRANSIENT_STORAGE	"Transient"
 
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 267fee7..36005a3 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -458,6 +458,8 @@ init_params(struct cli *cli)
 		def = low;
 	MCF_ParamConf(MCF_DEFAULT, "thread_pool_stack", "%jd", (intmax_t)def);
 
+	MCF_ParamConf(MCF_MAXIMUM, "thread_pools", "%d", MAX_THREAD_POOLS);
+
 	MCF_InitParams(cli);
 }
 



More information about the varnish-commit mailing list