]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: rely on _SC_NPROCESSORS_CONF to trim maxcpus
authorWilly Tarreau <w@1wt.eu>
Thu, 13 Mar 2025 09:27:22 +0000 (10:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 17:30:30 +0000 (18:30 +0100)
commit041462c4af744b27e368243bdb2632ca4551ab22
treec6af2006c5ac723b3d81ffbadbe98baebe71f909
parent656cedad424d5093647fea31205bb0528c956f73
MINOR: cpu-topo: rely on _SC_NPROCESSORS_CONF to trim maxcpus

We don't want to constantly deal with as many CPUs as a cpuset can hold,
so let's first try to trim the value to what the system claims to support
via _SC_NPROCESSORS_CONF. It is obviously still subject to the limit of
the cpuset size though. The value is stored globally so that we can
reuse it elsewhere after initialization.
include/haproxy/cpu_topo.h
src/cpu_topo.c