[PATCH 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level
From: Li Chen
Date: Tue Jun 24 2025 - 04:10:03 EST
From: Li Chen <chenl311@xxxxxxxxxxxxxxx>
This two–patch series cleans up sched-domain topology handling and
eliminates hundreds of pointless attach/destroy cycles when SMT is
not available.
Patch 1 (from Thomas, unchanged) gets rid of the #ifdef maze in
build_sched_topology() by statically initialising the topology array.
Patch 2 (mine) is a follow-up that simply memmoves the array when
cpu_smt_num_threads <= 1, so the SMT level never gets created and
immediately torn down again.
Tested on Qemu.
Li Chen (1):
x86/smpboot: avoid SMT domain attach/destroy if SMT is not enabled
Thomas Gleixner (1):
x86/smpboot: Decrapify build_sched_topology()
arch/x86/kernel/smpboot.c | 59 +++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 27 deletions(-)
--
2.49.0