From: Willy Tarreau Date: Thu, 27 Feb 2025 10:22:58 +0000 (+0100) Subject: MINOR: cpu-topo: refine cpu dump output to better show kept/dropped CPUs X-Git-Tag: v3.2-dev8~68 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=322c28cc1908345a011817191a552663c3c936bd;p=thirdparty%2Fhaproxy.git MINOR: cpu-topo: refine cpu dump output to better show kept/dropped CPUs It's becoming difficult to see which CPUs are going to be kept/dropped. Let's just skip all offline CPUs, and indicate "keep" in front of those that are going to be used, and "----" in front of the excluded ones. It is way more readable this way. Also let's just drop the array entry number, since it's always the same as the CPU number and is only an internal representation anyway. --- diff --git a/src/cpu_topo.c b/src/cpu_topo.c index 2aab0d6b7..d93940895 100644 --- a/src/cpu_topo.c +++ b/src/cpu_topo.c @@ -189,9 +189,9 @@ void cpu_dump_topology(const struct ha_cpu_topo *topo) if (ha_cpu_topo[cpu].st & HA_CPU_F_OFFLINE) continue; - printf("%3d: cpu=%3d excl=%d pk=%02d no=%02d cl=%03d(%03d)", - cpu, ha_cpu_topo[cpu].idx, - (ha_cpu_topo[cpu].st & HA_CPU_F_EXCL_MASK), + printf("[%s] cpu=%3d pk=%02d no=%02d cl=%03d(%03d)", + (ha_cpu_topo[cpu].st & HA_CPU_F_EXCL_MASK) ? "----" : "keep", + ha_cpu_topo[cpu].idx, ha_cpu_topo[cpu].pk_id, ha_cpu_topo[cpu].no_id, ha_cpu_topo[cpu].cl_gid,