]> git.kaiwu.me - 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:27:29 +0000 (18:27 +0200)
commitf502662ef7493ab73b1ee978dcff8a1517382b0b
tree1371b8b1ed68382c9118d0e9bd87f78a0c118bf0
parent58ae25d024cb60d3de9b4eed3a3d61dbde16674d
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