]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: init: set process' affinity even in foreground
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Jul 2023 16:39:32 +0000 (18:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 20 Jul 2023 09:01:09 +0000 (11:01 +0200)
commitc955659906ffc04b1d3a25ffd2541ef3e5bab0e7
tree3082741650c8e122ccb1043255b33bb4a9aa68a5
parent151f9a2808fcac5cd69f5ce32a79272f59055d73
BUG/MINOR: init: set process' affinity even in foreground

The per-process CPU affinity settings are only applied during forking,
which means that cpu-map are ignored when running in foreground (e.g.
haproxy started with -db). This is historic due to the original semantics
of a process array, but isn't documented and causes surprises when trying
to debug affinity settings.

Let's make sure the setting is applied to the workers themselves even
in foreground. This may be backported to 2.6 though it is really not
important. If backported, it also depends on previous commit:

  BUG/MINOR: cpuset: remove the bogus "proc" from the cpu_map struct
src/haproxy.c