Changing the configuration state of CPUs

SUSE Linux Enterprise Server 15 SP5 LPAR mode

A CPU on an LPAR can be in configuration state configured, standby, or reserved. You can change the state of standby CPUs to configured state and vice versa.

Before you begin

  • You can change the configuration state of CPUs for Linux® in LPAR mode only. For Linux on z/VM®, CPUs are always in a configured state.
  • Daemon processes like cpuplugd can change the state of any CPU at any time. Such changes can interfere with manual changes.

About this task

When Linux is booted, only CPUs that are in a configured state are brought online and used. The kernel does not detect CPUs in reserved state.

Procedure

Issue a command of this form to change the configuration state of a CPU:
# chcpu -c|-g <N>
where
<N>
is the number of the logical CPU.
-c
changes the configuration state of a CPU from standby to configured.
-g
changes the configuration state of a CPU from configured to standby. Only offline CPUs can be changed to the standby state.
Alternatively, you can write 1 to the configure sysfs attribute of a CPU to set its configuration state to configured, or 0 to change its configuration state to standby.
Examples:
  • The following chcpu command changes the state of the logical CPU with number 2 from standby to configured:
    # chcpu -c 2
    The following command achieves the same results by writing 1 to the configure sysfs attribute of the CPU.
    
    # echo 1 > /sys/devices/system/cpu/cpu2/configure
  • The following chcpu command changes the state of the logical CPU with number 2 from configured to standby:
    # chcpu -g 2
    The following command achieves the same results by writing 0 to the configure sysfs attribute of the CPU.
    
    # echo 0 > /sys/devices/system/cpu/cpu2/configure