mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level
@ 2025-06-24  8:55 Li Chen
  2025-06-24  8:55 ` [PATCH V2 1/2] x86/smpboot: Decrapify build_sched_topology() Li Chen
  2025-06-24  8:55 ` [PATCH V2 2/2] x86/smpboot: avoid SMT domain attach/destroy if SMT is not enabled Li Chen
  0 siblings, 2 replies; 3+ messages in thread
From: Li Chen @ 2025-06-24  8:55 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 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]

[1]: https://www.spinics.net/lists/kernel/msg5732082.html

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] 3+ messages in thread

end of thread, other threads:[~2025-06-24  8:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-24  8:55 [PATCH V2 0/2] x86/smpboot: tidy sched-topology and drop useless SMT level Li Chen
2025-06-24  8:55 ` [PATCH V2 1/2] x86/smpboot: Decrapify build_sched_topology() Li Chen
2025-06-24  8:55 ` [PATCH V2 2/2] x86/smpboot: avoid SMT domain attach/destroy if SMT is not enabled Li Chen

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

all inboxes | Powered by JetHome®