Return-Path: Received: from localhost ([127.0.0.1] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1fQeAT-0005Qz-AV for speck@linutronix.de; Wed, 06 Jun 2018 21:32:25 +0200 Message-ID: <20180606192714.754943543@linutronix.de> Date: Wed, 06 Jun 2018 21:27:14 +0200 From: Thomas Gleixner Subject: [patch V2 00/12] cpu/hotplug: SMT control Mime-Version: 1 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: The following series is a reworked version of the initial proof of concept patch. The main changes are: - The primary sibling evaluation has been changed to use APIC ID, so the hacky stuff is gone. - The control has now 3 states: on, off, forceoff forceoff is a irreversible operation and if given on the command line via 'nosmt=force' it makes the processor/APIC enumeration code discard the non primary siblings. That affects also the number of possible CPUs and is more or less equivalent to disabling SMT in the BIOS. If 'forceoff' is written to the sysfs file, then the non primamry siblings are offlined as with 'off', but the operation cannot be undone. That has obviously no effect on num_possible_cpus as that has been evaluated in the early boot process. - Command line and sysfs interface are documented Survived testing on various Intel and AMD machines and in VMs of different flavours and topology configurations. Applies on top of Linus tree. Thanks, tglx --- Documentation/ABI/testing/sysfs-devices-system-cpu | 16 ++ Documentation/admin-guide/kernel-parameters.txt | 4 arch/Kconfig | 3 arch/x86/include/asm/apic.h | 8 + arch/x86/include/asm/topology.h | 4 arch/x86/kernel/acpi/boot.c | 3 arch/x86/kernel/apic/apic.c | 34 ++++ arch/x86/kernel/cpu/amd.c | 18 +- arch/x86/kernel/cpu/common.c | 36 ++-- arch/x86/kernel/cpu/cpu.h | 2 arch/x86/kernel/cpu/intel.c | 7 arch/x86/kernel/cpu/topology.c | 41 +++-- arch/x86/kernel/smpboot.c | 9 + b/arch/x86/Kconfig | 1 include/linux/cpu.h | 12 + kernel/cpu.c | 152 +++++++++++++++++++-- kernel/sched/core.c | 32 +--- kernel/sched/fair.c | 1 18 files changed, 308 insertions(+), 75 deletions(-)