mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-05 03:29:35 +00:00
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.
This commit is contained in:
parent
ff4121f741
commit
11da456e77
@ -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> <cpu-set>...
|
||||
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 [<address:port>|<path>] [param*]
|
||||
Binds a UNIX socket to <path> or a TCPv4/v6 address to <address:port>.
|
||||
Connections to this socket will return various statistics outputs and even
|
||||
|
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user