Commit 97c9a342 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Respect PTHREAD_STACK_MIN for workerthread stack size.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4583 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent adf857b8
......@@ -191,10 +191,11 @@ const struct parspec WRK_parspec[] = {
EXPERIMENTAL,
"3", "requests per request" },
{ "thread_pool_stack",
tweak_uint, &master.wthread_stacksize, 64*1024, UINT_MAX,
"Worker thread stack size. In particular on 32bit systems "
"you may need to tweak this down to fit many threads into "
"the limited address space.\n",
tweak_uint, &master.wthread_stacksize,
PTHREAD_STACK_MIN, UINT_MAX,
"Worker thread stack size.\n"
"On 32bit systems you may need to tweak this down to fit "
"many threads into the limited address space.\n",
EXPERIMENTAL,
"-1", "bytes" },
{ NULL, NULL, NULL }
......
......@@ -587,7 +587,11 @@ main(int argc, char * const *argv)
*/
MCF_ParamSet(cli, "sess_workspace", "16384");
cli_check(cli);
MCF_ParamSet(cli, "thread_pool_stack", "65536");
/* Set the stacksize to min(PTHREAD_STACK_MIN, 64k) */
bprintf(dirname, "%d",
PTHREAD_STACK_MIN > 65536 ? PTHREAD_STACK_MIN : 65536);
MCF_ParamSet(cli, "thread_pool_stack", dirname);
cli_check(cli);
}
......
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