]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: make sure we don't leave unassigned IDs in the cpu_topo
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Mar 2025 07:54:59 +0000 (08:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 17:30:31 +0000 (18:30 +0100)
commitd169758fa9fe3f4ac4db884b0b56cf94fe53b69d
treeb51956446087d75713adba94424f7157e2ec0dfb
parentaf648c7b58a22bace702523054a1d1111e2c78e7
MINOR: cpu-topo: make sure we don't leave unassigned IDs in the cpu_topo

It's important that we don't leave unassigned IDs in the topology,
because the selection mechanism is based on index-based masks, so an
unassigned ID will never be kept. This is particularly visible on
systems where we cannot access the CPU topology, the package id, node id
and even thread id are set to -1, and all CPUs are evicted due to -1 not
being set in the "only-cpu" sets.

Here in new function "cpu_fixup_topology()", we assign them with the
smallest unassigned value. This function will be used to assign IDs
where missing in general.
include/haproxy/cpu_topo.h
src/cpu_topo.c
src/haproxy.c