public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level
@ 2025-06-25  3:45 Li Chen
  2025-06-25  3:45 ` [PATCH v3 1/2] x86/smpboot: Decrapify build_sched_topology() Li Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Li Chen @ 2025-06-25  3:45 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H . Peter Anvin, Rafael J . Wysocki, Peter Zijlstra,
	K Prateek Nayak, Sohil Mehta, Brian Gerst, Patryk Wlazlyn,
	linux-kernel

From: Li Chen <chenl311@chinatelecom.cn>

This two–patch series cleans up sched-domain topology handling and
eliminates hundreds of pointless attach/destroy cycles for large
machines 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.

changelog:
v2: fix wording issue as suggested by Thomas [1]
v3: remove pointless memset and adjust PKG index accordingly, as
    suggested by Thomas [2], and refine some other wording issues.

[1]: https://lore.kernel.org/all/87msa2r018.ffs@tglx/
[2]: https://lore.kernel.org/all/875xglntx1.ffs@tglx/

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-06-30 12:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-25  3:45 [PATCH v3 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level Li Chen
2025-06-25  3:45 ` [PATCH v3 1/2] x86/smpboot: Decrapify build_sched_topology() Li Chen
2025-06-25  8:28   ` Peter Zijlstra
2025-06-30  0:21     ` Li Chen
2025-06-30 12:56       ` Thomas Gleixner
2025-06-25  3:45 ` [PATCH v3 2/2] x86/smpboot: avoid SMT domain attach/destroy if SMT is not enabled Li Chen
2025-06-25  5:45   ` K Prateek Nayak
2025-06-25  8:30     ` Peter Zijlstra
2025-06-30  0:39     ` Li Chen
2025-06-25  8:29   ` Peter Zijlstra
2025-06-30  0:29     ` Li Chen
2025-06-25  5:50 ` [PATCH v3 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level K Prateek Nayak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox