]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: skip CPU properties that we've verified do not exist
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Jan 2025 19:01:52 +0000 (20:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 17:30:31 +0000 (18:30 +0100)
commit661d49a18a81a9844c3a9c785156346ea852a544
tree6d3642b9d33a123dbd9ca8c2906ca3d7a1c393fb
parentbaeea08dbacf352cba38bdc4183b6bea51e89367
MINOR: cpu-topo: skip CPU properties that we've verified do not exist

A number of entries under /cpu/cpu%d only exist on certain kernel
versions, certain archs and/or with certain modules loaded. It's
pointless to insist on trying to read them all for all CPUs when
we've already verified they do not exist. Thus let's use stat()
the first time prior to checking some of them, and only try to
access them when they really exist. This almost completely
eliminates the large number of ENOENT that was visible in strace
during startup.
src/cpu_topo.c