]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: notify when cpu-policy is ignored due to other settings
authorWilly Tarreau <w@1wt.eu>
Thu, 28 May 2026 15:41:18 +0000 (17:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 May 2026 16:49:47 +0000 (18:49 +0200)
commitdad00a7442c1dbb0d859956379814aa32f1ae700
treeabeb12a41b19df3714e811862e7bb0f82c589eab
parentf91b1ce9af72cff392283cdf29b24471fc6b917f
MINOR: cpu-topo: notify when cpu-policy is ignored due to other settings

The cpu-policy directive is ignored when nbthreads, thread-groups, or
cpu-map are set. In addition, first-usable-node is ignored when the
process was externally restricted (e.g. taskset). This is difficult to
debug when it happens because multiple parameters come into the mix and
it's easy to forget to unset one. Let's emit a notice when this happens
and the policy was forced. This way, it remains silent with the default
policy, but if it was forced, the incompatibility is reported.

It's worth noting that ll the cpu-policy functions take a char **err
but none uses it. It could have been useful here instead of calling
ha_notice() all along, but one needs to determine who the consumers
are and who will be responsible for freeing the message, so let's go
with ha_notice() given that were were already some diag_warnings in
these functions.

It could be helpful to backport this to 3.2.
src/cpu_topo.c