]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: cpu-topo: use cpufreq before acpi cppc
authorWilly Tarreau <w@1wt.eu>
Wed, 12 Mar 2025 12:28:24 +0000 (13:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Mar 2025 17:30:30 +0000 (18:30 +0100)
commite4aa13e78687ae77b6263f97ed0244390adcf4b9
treef606c80d212a5df8864e9c555133caab3da6b8e6
parentd11241b7ba936ff823016cd2e6096822af58a46f
MINOR: cpu-topo: use cpufreq before acpi cppc

The acpi_cppc method was found to take about 5ms per CPU on a 64-core
EPYC system, which is plain unacceptable as it delays the boot by half
a second. Let's use the less accurate cpufreq first, which should be
sufficient anyway since many systems do not have acpi_cppc. We'll only
fall back to acpi_cppc for systems without cpufreq. If it were to be
an issue over time, we could also automatically consider that all
threads of the same core or even of the same cluster run at the same
speed (when a cluster is known to be accurate).
src/cpu_topo.c