Paravirt Linux CPU Hotplug: Difference between revisions
(Created page with "Why does not xl vcpu-set work as expected when I try to increase the number of VCPUs? Most likely it is udev event is not handled correctly in the targeting domain. To identify…") |
No edit summary |
||
Line 1: | Line 1: | ||
Why does not xl vcpu-set work as expected when I try to increase the number of VCPUs? |
Why does not xl vcpu-set work as expected when I try to increase the number of VCPUs? |
||
Most likely |
Most likely that udev event is not handled correctly in the target domain. |
||
To identify the problem, try to run `udevadm monitor` as root. If you can see similar output: |
To identify the problem, try to run `udevadm monitor` as root in target domain, then plug CPUs. If you can see similar output: |
||
KERNEL[1327937839.577165] add /devices/system/cpu/cpu1 (cpu) |
KERNEL[1327937839.577165] add /devices/system/cpu/cpu1 (cpu) |
||
Line 12: | Line 12: | ||
then CPUs are correctly added to system. |
then CPUs are correctly added to system. |
||
All you need to do is write to corresponding sysfs nodes to bring those CPUs online. |
All you need to do now is write to corresponding sysfs nodes to bring those CPUs online. |
||
To automate this process, simply create a `cpu-online.rules` under /etc/udev/rules.d and restart udevd. |
To automate this process, simply create a `cpu-online.rules` under /etc/udev/rules.d in target domain and restart udevd. |
||
Content of `cpu-online.rules`: |
Content of `cpu-online.rules`: |
Revision as of 16:10, 30 January 2012
Why does not xl vcpu-set work as expected when I try to increase the number of VCPUs?
Most likely that udev event is not handled correctly in the target domain.
To identify the problem, try to run `udevadm monitor` as root in target domain, then plug CPUs. If you can see similar output:
KERNEL[1327937839.577165] add /devices/system/cpu/cpu1 (cpu) UDEV [1327937839.577368] add /devices/system/cpu/cpu1 (cpu) KERNEL[1327937839.577581] add /devices/system/cpu/cpu2 (cpu) UDEV [1327937839.577684] add /devices/system/cpu/cpu2 (cpu)
then CPUs are correctly added to system.
All you need to do now is write to corresponding sysfs nodes to bring those CPUs online.
To automate this process, simply create a `cpu-online.rules` under /etc/udev/rules.d in target domain and restart udevd.
Content of `cpu-online.rules`:
SUBSYSTEM=="cpu",ACTION=="add",RUN+="/bin/sh -c '[ ! -e /sys$devpath/online ] || echo 1 > /sys$devpath/online'"
If you cannot see hotplug events, probably you're hitting other limitations such as max VCPU quotation, do check against Xen configuration documents.
If you've checked every options and configurations and believe that this problem is caused by a bug, please follow instructions in Reporting_Bugs_against_Xen to submit bug report.