Commit e954c73d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

param: Promote mempools in the parameters table

We had everything we needed to make this happen, except for the mismatch
between parameter names pool_xxx and struct member names xxx_pool.

Refs #3250
parent 89a558e5
...@@ -49,7 +49,7 @@ void ...@@ -49,7 +49,7 @@ void
VBO_Init(void) VBO_Init(void)
{ {
vbopool = MPL_New("busyobj", &cache_param->vbo_pool, vbopool = MPL_New("busyobj", &cache_param->pool_vbo,
&cache_param->workspace_backend); &cache_param->workspace_backend);
AN(vbopool); AN(vbopool);
} }
......
...@@ -630,10 +630,10 @@ SES_NewPool(struct pool *pp, unsigned pool_no) ...@@ -630,10 +630,10 @@ SES_NewPool(struct pool *pp, unsigned pool_no)
CHECK_OBJ_NOTNULL(pp, POOL_MAGIC); CHECK_OBJ_NOTNULL(pp, POOL_MAGIC);
bprintf(nb, "req%u", pool_no); bprintf(nb, "req%u", pool_no);
pp->mpl_req = MPL_New(nb, &cache_param->req_pool, pp->mpl_req = MPL_New(nb, &cache_param->pool_req,
&cache_param->workspace_client); &cache_param->workspace_client);
bprintf(nb, "sess%u", pool_no); bprintf(nb, "sess%u", pool_no);
pp->mpl_sess = MPL_New(nb, &cache_param->sess_pool, pp->mpl_sess = MPL_New(nb, &cache_param->pool_sess,
&cache_param->workspace_session); &cache_param->workspace_session);
pp->waiter = Waiter_New(); pp->waiter = Waiter_New();
......
...@@ -115,10 +115,6 @@ struct params { ...@@ -115,10 +115,6 @@ struct params {
struct vre_limits vre_limits; struct vre_limits vre_limits;
struct poolparam req_pool;
struct poolparam sess_pool;
struct poolparam vbo_pool;
uint8_t vsl_mask[256>>3]; uint8_t vsl_mask[256>>3];
uint8_t debug_bits[(DBG_Reserved+7)>>3]; uint8_t debug_bits[(DBG_Reserved+7)>>3];
uint8_t feature_bits[(FEATURE_Reserved+7)>>3]; uint8_t feature_bits[(FEATURE_Reserved+7)>>3];
......
...@@ -38,12 +38,6 @@ ...@@ -38,12 +38,6 @@
#include "mgt/mgt_param.h" #include "mgt/mgt_param.h"
#define MEMPOOL_TEXT \
"The three numbers are:\n" \
"\tmin_pool\tminimum size of free pool.\n" \
"\tmax_pool\tmaximum size of free pool.\n" \
"\tmax_age\tmax age of free element."
struct parspec mgt_parspec[] = { struct parspec mgt_parspec[] = {
#define PARAM(nm, ty, ...) { #nm, tweak_##ty, &mgt_param.nm, __VA_ARGS__ }, #define PARAM(nm, ty, ...) { #nm, tweak_##ty, &mgt_param.nm, __VA_ARGS__ },
#include "tbl/params.h" #include "tbl/params.h"
...@@ -122,21 +116,6 @@ struct parspec mgt_parspec[] = { ...@@ -122,21 +116,6 @@ struct parspec mgt_parspec[] = {
"Matching failures will show up in the log as VCL_Error" "Matching failures will show up in the log as VCL_Error"
" messages with regexp errors -27 or -21.\n\n" " messages with regexp errors -27 or -21.\n\n"
"Testcase r01576 can be useful when tuning this parameter." }, "Testcase r01576 can be useful when tuning this parameter." },
{ "pool_req", tweak_poolparam, &mgt_param.req_pool,
NULL, NULL, "10,100,10",
NULL,
"Parameters for per worker pool request memory pool.\n\n"
MEMPOOL_TEXT },
{ "pool_sess", tweak_poolparam, &mgt_param.sess_pool,
NULL, NULL, "10,100,10",
NULL,
"Parameters for per worker pool session memory pool.\n\n"
MEMPOOL_TEXT },
{ "pool_vbo", tweak_poolparam, &mgt_param.vbo_pool,
NULL, NULL, "10,100,10",
NULL,
"Parameters for backend object fetch memory pool.\n\n"
MEMPOOL_TEXT },
{ NULL, NULL, NULL } { NULL, NULL, NULL }
}; };
...@@ -1209,6 +1209,50 @@ PARAM( ...@@ -1209,6 +1209,50 @@ PARAM(
"HTTP2 maximum size of an uncompressed header list." "HTTP2 maximum size of an uncompressed header list."
) )
#define MEMPOOL_TEXT \
"The three numbers are:\n" \
"\tmin_pool\tminimum size of free pool.\n" \
"\tmax_pool\tmaximum size of free pool.\n" \
"\tmax_age\tmax age of free element."
PARAM(
/* name */ pool_req,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for per worker pool request memory pool.\n"
MEMPOOL_TEXT
)
PARAM(
/* name */ pool_sess,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for per worker pool session memory pool.\n"
MEMPOOL_TEXT
)
PARAM(
/* name */ pool_vbo,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for backend object fetch memory pool.\n"
MEMPOOL_TEXT
)
#undef MEMPOOL_TEXT
#if 0 /* NOT ACTUALLY DEFINED HERE */ #if 0 /* NOT ACTUALLY DEFINED HERE */
/* actual location mgt_param_bits.c*/ /* actual location mgt_param_bits.c*/
/* see tbl/debug_bits.h */ /* see tbl/debug_bits.h */
...@@ -1286,45 +1330,6 @@ PARAM( ...@@ -1286,45 +1330,6 @@ PARAM(
"recursions in a pcre_exec() execution." "recursions in a pcre_exec() execution."
) )
/* actual location mgt_param_tbl.c */
PARAM(
/* name */ pool_req,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for per worker pool request memory pool.\n"
MEMPOOL_TEXT
)
/* actual location mgt_param_tbl.c */
PARAM(
/* name */ pool_sess,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for per worker pool session memory pool.\n"
MEMPOOL_TEXT
)
/* actual location mgt_param_tbl.c */
PARAM(
/* name */ pool_vbo,
/* type */ poolparam,
/* min */ NULL,
/* max */ NULL,
/* def */ "10,100,10",
/* units */ NULL,
/* descr */
"Parameters for backend object fetch memory pool.\n"
MEMPOOL_TEXT
)
/* actual location mgt_pool.c */ /* actual location mgt_pool.c */
PARAM( PARAM(
/* name */ thread_pool_add_delay, /* name */ thread_pool_add_delay,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment