MINOR: thread: dump the CPU topology in thread_map_to_groups()

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.
This commit is contained in:
Willy Tarreau 2025-03-31 15:40:41 +02:00
parent b303861469
commit e17512c3b2

View 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;
}