]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR:: config: Remove thread-map directive
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Nov 2017 15:52:28 +0000 (16:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Nov 2017 14:38:50 +0000 (15:38 +0100)
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
src/cfgparse.c

index 6a4afb455ddc036b40e56c2db36cd292ee963daf..1fd57ce7783b9fe00781418e5a28c12b75ff7a7a 100644 (file)
@@ -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
index 83bab1ade3c103769a9fd12599dfbeda83fc4a07..a37a533681ccad53d8268cc0502dc129abc2a623 100644 (file)
@@ -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]);