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