From 11da456e77eebaba9cc64ea02b7c281220088d22 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 22 Nov 2017 16:52:28 +0100 Subject: [PATCH] MINOR:: config: Remove thread-map directive It was a temporary directive used for development purpose. Now, CPU mapping for at the thread level should be done using the cpu-map directive. This feature will be added in a next commit. --- doc/configuration.txt | 10 --------- src/cfgparse.c | 52 ------------------------------------------- 2 files changed, 62 deletions(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index 6a4afb455..1fd57ce77 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -558,7 +558,6 @@ The following keywords are supported in the "global" section : - ssl-default-server-options - ssl-dh-param-file - ssl-server-verify - - thread-map - unix-bind - unsetenv - 51degrees-data-file @@ -978,15 +977,6 @@ ssl-server-verify [none|required] servers certificates are not verified. The default is 'required' except if forced using cmdline option '-dV'. - -thread-map <"all"|"odd"|"even"|process_num> <"all"|"odd"|"even"|thread_num> ... - This setting is only available when support for threads was built in. It - binds a thread to a specific CPU set. The process must be specified to allow - different mapping for different processes. For details about the arguments, - see "cpu-map" directive. A thread will be bound on the intersection of its - mapping and the one of the process on which it is attached. If the - intersection is null, no specific bind will be set for the thread. - stats socket [|] [param*] Binds a UNIX socket to or a TCPv4/v6 address to . Connections to this socket will return various statistics outputs and even diff --git a/src/cfgparse.c b/src/cfgparse.c index 83bab1ade..a37a53368 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1746,58 +1746,6 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) global.cpu_map[i] = cpus; } } -#else - Alert("parsing [%s:%d] : '%s' is not enabled, please check build options for USE_CPU_AFFINITY.\n", - file, linenum, args[0]); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; -#endif /* ! USE_CPU_AFFINITY */ - } - else if (strcmp(args[0], "thread-map") == 0) { - /* map a thread list to a CPU set */ -#ifdef USE_CPU_AFFINITY -#ifdef USE_THREAD - unsigned long proc = 0, thread = 0, cpus; - int i, j; - - if (!*args[1] || !*args[2] || !*args[3]) { - Alert("parsing [%s:%d]: %s expects a process number " - "('all', 'odd', 'even', or a number from 1 to %d), " - " followed by a thread number using the same format, " - " followed by a list of CPU ranges with numbers from 0 to %d.\n", - file, linenum, args[0], LONGBITS, LONGBITS - 1); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; - } - - if (parse_process_number(args[1], &proc, NULL, &errmsg)) { - Alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; - } - if (parse_process_number(args[2], &thread, NULL, &errmsg)) { - Alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; - } - if (parse_cpu_set((const char **)args+3, &cpus, &errmsg)) { - Alert("parsing [%s:%d] : %s : %s\n", file, linenum, args[0], errmsg); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; - } - - for (i = 0; i < LONGBITS; i++) - if (proc & (1UL << i)) { - for (j = 0; j < LONGBITS; j++) - if (thread & (1UL << j)) - global.thread_map[i][j] = cpus; - } -#else - Alert("parsing [%s:%d] : '%s' is not enabled, please check build options for USE_THREAD.\n", - file, linenum, args[0]); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; -#endif /* ! USE_THREAD*/ #else Alert("parsing [%s:%d] : '%s' is not enabled, please check build options for USE_CPU_AFFINITY.\n", file, linenum, args[0]);