]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: thread: dump the CPU topology in thread_map_to_groups()
authorWilly Tarreau <w@1wt.eu>
Mon, 31 Mar 2025 13:40:41 +0000 (15:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 31 Mar 2025 13:42:13 +0000 (15:42 +0200)
It was previously done in thread_detect_count() but that's not quite
handy because we still don't know about the groups setting. Better do
it slightly later and have all the relevant info instead.

src/thread.c

index 5a2257d089f8ee23e99549c82e269931c6c0fdd1..3ca0b5a4e51ef9964552d0a421d2c6ea80bd59e9 100644 (file)
@@ -1432,6 +1432,13 @@ int thread_map_to_groups()
 #ifdef USE_THREAD
        all_tgroups_mask = m;
 #endif
+
+#if defined(USE_THREAD) && defined(USE_CPU_AFFINITY)
+       if (global.tune.debug & GDBG_CPU_AFFINITY) {
+               cpu_reorder_by_index(ha_cpu_topo, cpu_topo_maxcpus);
+               cpu_dump_topology(ha_cpu_topo);
+       }
+#endif
        return 0;
 }
 
@@ -1664,13 +1671,6 @@ void thread_detect_count(void)
                                global.nbthread, MAX_THREADS_PER_GROUP * global.nbtgroups, MAX_THREADS_PER_GROUP, MAX_TGROUPS);
                global.nbthread = MAX_THREADS_PER_GROUP * global.nbtgroups;
        }
-
-#if defined(USE_THREAD) && defined(USE_CPU_AFFINITY)
-       if (global.tune.debug & GDBG_CPU_AFFINITY) {
-               cpu_reorder_by_index(ha_cpu_topo, cpu_topo_maxcpus);
-               cpu_dump_topology(ha_cpu_topo);
-       }
-#endif
        return;
 }