]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: Add auto-increment feature for cpu-map
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 22 Nov 2017 14:01:51 +0000 (15:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Nov 2017 14:38:49 +0000 (15:38 +0100)
commit26028f620941a514417b3186841580739052ae56
tree7da5ba0a11a3c57300c5f191cb6f753b814d1d2e
parentff8131861f364a46030b854d34e67caf54d62569
MINOR: config: Add auto-increment feature for cpu-map

The prefix "auto:" can be added before the process set to let HAProxy
automatically bind a process to a CPU by incrementing process and CPU sets. To
be valid, both sets must have the same size. No matter the declaration order of
the CPU sets, it will be bound from the lower to the higher bound.

  Examples:
      # all these lines bind the process 1 to the cpu 0, the process 2 to cpu 1
      #  and so on.
      cpu-map auto:1-4   0-3
      cpu-map auto:1-4   0-1 2-3
      cpu-map auto:1-4   3 2 1 0

      # bind each process to exaclty one CPU using all/odd/even keyword
      cpu-map auto:all   0-63
      cpu-map auto:even  0-31
      cpu-map auto:odd   32-63

      # invalid cpu-map because process and CPU sets have different sizes.
      cpu-map auto:1-4   0    # invalid
      cpu-map auto:1     0-3  # invalid
doc/configuration.txt
include/common/cfgparse.h
src/cfgparse.c
src/cli.c
src/listener.c