]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: cpu-topo: Don't forget to reset visited_ccx. master
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 26 Dec 2025 22:50:20 +0000 (23:50 +0100)
committerOlivier Houchard <cognet@ci0.org>
Fri, 26 Dec 2025 22:55:57 +0000 (23:55 +0100)
We want to reset visited_ccx, as introduced by commit
8aef5bec1ef57eac449298823843d6cc08545745, each time we run the loop,
otherwise the chances of its content being correct are very low, and
will likely end up being bound to the wrong threads.
This was reported in github issue #3224.

src/cpu_topo.c

index 2a2966cd4ce44f67106fcf1fb6cecf1cebe7dde7..9d3a7e8ca3db40e85470261ba46d7b85e69b30ed 100644 (file)
@@ -1507,6 +1507,7 @@ static int cpu_policy_group_by_ccx(int policy, int tmin, int tmax, int gmin, int
        while (global.nbtgroups < MAX_TGROUPS && global.nbthread < MAX_THREADS) {
                ha_cpuset_zero(&node_cpu_set);
                ha_cpuset_zero(&visited_tsid);
+               ha_cpuset_zero(&visited_ccx);
                l3id = -1; cpu_count = 0;
 
                for (cpu = cpu_start; cpu <= cpu_topo_lastcpu; cpu++) {