[master] 841596c Split the worker thread workspace size out into its own parameter "thread_pool_workspace"
Poul-Henning Kamp
phk at varnish-cache.org
Wed Feb 23 13:45:52 CET 2011
commit 841596c7d0e8b88a3bbbfa17849b6808564c8ea8
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Feb 23 12:45:21 2011 +0000
Split the worker thread workspace size out into its own parameter
"thread_pool_workspace"
diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c
index 225c08e..49cfc9f 100644
--- a/bin/varnishd/cache_pool.c
+++ b/bin/varnishd/cache_pool.c
@@ -123,6 +123,7 @@ wrk_thread_real(struct wq *qp, unsigned shm_workspace, unsigned sess_workspace,
{
struct worker *w, ww;
uint32_t wlog[shm_workspace / 4];
+ /* XXX: can we trust these to be properly aligned ? */
unsigned char ws[sess_workspace];
unsigned char http0[http_space];
unsigned char http1[http_space];
@@ -230,7 +231,7 @@ wrk_thread(void *priv)
siov = IOV_MAX;
return (wrk_thread_real(qp,
params->shm_workspace,
- params->sess_workspace,
+ params->wthread_workspace,
nhttp, HTTP_estimate(nhttp), siov));
}
diff --git a/bin/varnishd/heritage.h b/bin/varnishd/heritage.h
index c527f98..fb94312 100644
--- a/bin/varnishd/heritage.h
+++ b/bin/varnishd/heritage.h
@@ -90,6 +90,7 @@ struct params {
unsigned wthread_purge_delay;
unsigned wthread_stats_rate;
unsigned wthread_stacksize;
+ unsigned wthread_workspace;
unsigned queue_max;
diff --git a/bin/varnishd/mgt_pool.c b/bin/varnishd/mgt_pool.c
index a612541..cd0a371 100644
--- a/bin/varnishd/mgt_pool.c
+++ b/bin/varnishd/mgt_pool.c
@@ -227,5 +227,16 @@ const struct parspec WRK_parspec[] = {
"many threads into the limited address space.\n",
EXPERIMENTAL,
"-1", "bytes" },
+ { "thread_pool_workspace", tweak_uint, &master.wthread_workspace,
+ 1024, UINT_MAX,
+ "Bytes of HTTP protocol workspace allocated for worker "
+ "threads. "
+ "This space must be big enough for the backend request "
+ "and responses, and response to the client plus any other "
+ "memory needs in the VCL code."
+ "Minimum is 1024 bytes.",
+ DELAYED_EFFECT,
+ "65536",
+ "bytes" },
{ NULL, NULL, NULL }
};
More information about the varnish-commit
mailing list