Commit 0b31b9f0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make sure the thread_pool_stack default is at least the minimum

imposed by the kernel.

Spotted by:	ingvar (on PPC64)
parent 6cc6c642
......@@ -340,11 +340,12 @@ make_secret(const char *dirname)
/*--------------------------------------------------------------------*/
static char stackmin[20];
static char stackdef[20];
static void
init_params(struct cli *cli)
{
ssize_t low;
ssize_t def, low;
MCF_CollectParams();
......@@ -372,6 +373,12 @@ init_params(struct cli *cli)
bprintf(stackmin, "%jd", (intmax_t)low);
MCF_SetMinimum("thread_pool_stack", stackmin);
def = 48 * 1024;
if (def < low)
def = low;
bprintf(stackdef, "%jd", (intmax_t)def);
MCF_SetDefault("thread_pool_stack", stackdef);
MCF_InitParams(cli);
}
......
......@@ -214,6 +214,6 @@ struct parspec WRK_parspec[] = {
"This will likely be rounded up to a multiple of 4k"
" (or whatever the page_size might be) by the kernel.",
EXPERIMENTAL,
"48k", "bytes" },
NULL, "bytes" }, // default set in mgt_main.c
{ NULL, NULL, NULL }
};
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