Victor, I have the following notes:
How to dynamically add a CPU to an already logged on z/VM guest.
Traditionally, additional CPUs are defined using a USER DIRECT "CPU"
statement, which requires a guest logoff/logon and IPL to utilize.
One can dynamically increase the number of CPUs from the number of CPU
statements to the maximum specified in the USER DIRECT "MACHINE" statement.
If a guest has the following statements in USER DIRECT:
MACHINE ESA 3
CPU 00 BASE
CPU 01
They can use the CP commands to define and start a 3rd CPU.
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 CP CPUAFF ON
# vmcp define cpu 02
CPU 02 defined
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 CP CPUAFF ON
CPU 02 ID FF04920020640000 STOPPED CP CPUAFF ON
# vmcp begin cpu 02
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 CP CPUAFF ON
CPU 02 ID FF04920020640000 CP CPUAFF ON
Linux will still not be able to use the CPUs, until the sysfs structures
are allocated. At boot time, that's done for the CPUs available.
In sles9 the default is to preallocate all 64 sysfs CPU structures. One
could online them when new CPUs are added.
# echo 1 > /sys/devices/system/cpu/cpu2/online
In sles10 a kernel/zipl parameter called: "possible_cpus" is available. So
if one had, for example, possible_cpus=8 in zipl, there would be sysfs
structures for eight CPUs from the beginning and you could online them when
new CPUs are added to the LPAR and z/VM. This may still require a new
reboot in sles10, if this had not been done.
A SLES11 example:
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
# vmcp define cpu 01
CPU 01 defined
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 STOPPED CP CPUAFF ON
# ls /sys/devices/system/cpu/
cpu0 dispatching online possible present rescan
sched_mc_power_savings
# echo 1 > /sys/devices/system/cpu/rescan
# ls /sys/devices/system/cpu/
cpu0 cpu1 dispatching online possible present rescan
sched_mc_power_savings
# echo 1 > /sys/devices/system/cpu/cpu1/online
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 CP CPUAFF ON
# cat /proc/cpuinfo
vendor_id : IBM/S390
# processors : 2
bogomips per cpu: 2693.00
features : esan3 zarch
processor 0: version = FF, identification = 049200, machine = 2064
processor 1: version = FF, identification = 049200, machine = 2064
To deactivate an operating CPU:
Bring the CPU offline by writing "0" to its online attribute:
# echo 0 > /sys/devices/system/cpu/cpu1/online
# vmcp query virtual cpus
CPU 00 ID FF04920020640000 (BASE) CP CPUAFF ON
CPU 01 ID FF04920020640000 STOPPED CP CPUAFF ON
# grep processor /proc/cpuinfo
# processors : 1
processor 0: version = FF, identification = 049200, machine = 2064
There is no way to remove a STOPPED CPU without a Guest reset and no need
to as only a few z/VM control blocks remain for the Virtual CPU.
________________________
Mike O'Reilly
IBM Linux Change Team
Victor Echavarry
Diaz
<vechava...@evert To
ecinc.com> [email protected]
Sent by: Linux on cc
390 Port
<[email protected] Subject
ist.edu> Add additional CPU
04/07/2010 07:05
AM
Please respond to
Linux on 390 Port
<[email protected]
ist.edu>
Is there a way to add an additional CPU to a Linux guest without shutting
down?
Regards,
Víctor Echavarry
System Programmer
Technology Systems & Operations Division
EVERTEC
-----------------------------------------
CONFIDENTIALITY NOTE: This email communication and its attachments
contain information that are proprietary and confidential to
EVERTEC, INC., its affiliates or its clients. They may not be
disclosed, distributed, used, copied or modified in any way without
EVERTEC, Inc.’s authorization. If you are not the intended
recipient of this email, you are not an authorized person. Please
delete it and notify the sender immediately. EVERTEC, Inc. and its
affiliates do not assume any liability for damages resulting from
emails that have been sent or altered without their consent.
Moreover, EVERTEC, Inc. has taken precautions to safeguard its
email communications, but cannot assure that such is the case and
disclaim any responsibility attributable thereto.
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
<<inline: ecblank.gif>>
<<inline: graycol.gif>>
<<inline: pic10677.gif>>
