CPU Dynamic Reconfiguration
You can use CPU dynamic reconfiguration with domains that are configured with CPU whole cores. However, you can add or remove only entire CPU cores, not individual CPU threads. The hard partitioning state of the system is maintained by the CPU dynamic reconfiguration feature. In addition, if CPU cores are dynamically added to a domain, the maximum is enforced. Therefore, the CPU DR command would fail if it attempted to exceed the maximum number of CPUs.
Note:
Themax-cores
property cannot be altered unless the domain is stopped and unbound. So, to increase the maximum number of cores from the value specified at the time the whole-core constraint was set, you must first stop and unbind the domain.
Use the following commands to dynamically add to or remove CPU whole cores from a bound or active domain and to dynamically set the number of CPU whole cores for a bound or active domain:
ldm add-core number-of-CPU-cores domain ldm remove-core number-of-CPU-cores domain ldm set-core number-of-CPU-cores domain
Note:
If the domain is not active, these commands also adjust the maximum number of CPU cores for the domain. If the domain is bound or active, these commands do not affect the maximum number of CPU cores for the domain.Example 15-6 Dynamically Adding Two CPU Whole Cores to a Domain
This example shows how to dynamically add two CPU whole cores to the ldg1
domain. The ldg1
domain is an active domain that has been configured with CPU whole cores. The first command shows that the ldg1
domain is active. The second command shows that the ldg1
domain is configured with CPU whole cores and a maximum of four CPU cores. The third and fifth commands show the CPU cores that are assigned to the domain before and after the addition of two CPU whole cores. The fourth command dynamically adds two CPU whole cores to the ldg1
domain.
primary# ldm list ldg1 NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME ldg1 active -n---- 5000 16 2G 0.4% 5d 17h 49m primary# ldm list -o resmgmt ldg1 NAME ldg1 CONSTRAINT whole-core max-cores=4 primary# ldm list -o core ldg1 NAME ldg1 CORE CID PCPUSET 1 (8, 9, 10, 11, 12, 13, 14, 15) 2 (16, 17, 18, 19, 20, 21, 22, 23) primary# ldm add-core 2 ldg1 primary# ldm list -o core ldg1 NAME ldg1 CORE CID PCPUSET 1 (8, 9, 10, 11, 12, 13, 14, 15) 2 (16, 17, 18, 19, 20, 21, 22, 23) 3 (24, 25, 26, 27, 28, 29, 30, 31) 4 (32, 33, 34, 35, 36, 37, 38, 39)