• Thomas Gleixner's avatar
    cpu/hotplug: Provide knobs to control SMT · f37486c0
    Thomas Gleixner authored
    commit 05736e4ac13c08a4a9b1ef2de26dd31a32cbee57 upstream
    
    Provide a command line and a sysfs knob to control SMT.
    
    The command line options are:
    
     'nosmt':	Enumerate secondary threads, but do not online them
    
     'nosmt=force': Ignore secondary threads completely during enumeration
     		via MP table and ACPI/MADT.
    
    The sysfs control file has the following states (read/write):
    
     'on':		 SMT is enabled. Secondary threads can be freely onlined
     'off':		 SMT is disabled. Secondary threads, even if enumerated
     		 cannot be onlined
     'forceoff':	 SMT is permanentely disabled. Writes to the control
     		 file are rejected.
     'notsupported': SMT is not supported by the CPU
    
    The command line option 'nosmt' sets the sysfs control to 'off'. This
    can be changed to 'on' to reenable SMT during runtime.
    
    The command line option 'nosmt=force' sets the sysfs control to
    'forceoff'. This cannot be changed during runtime.
    
    When SMT is 'on' and the control file is changed to 'off' then all online
    secondary threads are offlined and attempts to online a secondary thread
    later on are rejected.
    
    When SMT is 'off' and the control file is changed to 'on' then secondary
    threads can be onlined again. The 'off' -> 'on' transition does not
    automatically online the secondary threads.
    
    When the control file is set to 'forceoff', the behaviour is the same as
    setting it to 'off', but the operation is irreversible and later writes to
    the control file are rejected.
    
    When the control status is 'notsupported' then writes to the control file
    are rejected.
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: default avatarIngo Molnar <mingo@kernel.org>
    Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    f37486c0
Kconfig 23 KB