mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: cpu-topo: cpu_dump_topology() SMT info check little optimisation
Once we stumble across the first cpu having the criteria, we exit earlier from the loop.
This commit is contained in:
parent
3de99a0919
commit
a703eeaef7
1 changed files with 5 additions and 2 deletions
|
|
@ -219,9 +219,12 @@ void cpu_dump_topology(const struct ha_cpu_topo *topo)
|
|||
int cpu, lvl;
|
||||
int grp, thr;
|
||||
|
||||
for (cpu = 0; cpu <= cpu_topo_lastcpu; cpu++)
|
||||
if (ha_cpu_topo[cpu].th_cnt > 1)
|
||||
for (cpu = 0; cpu <= cpu_topo_lastcpu; cpu++) {
|
||||
if (ha_cpu_topo[cpu].th_cnt > 1) {
|
||||
has_smt = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (cpu = 0; cpu <= cpu_topo_lastcpu; cpu++) {
|
||||
if (ha_cpu_topo[cpu].st & HA_CPU_F_OFFLINE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue