Paravirt Linux CPU Hotplug: Difference between revisions

From Xen
Jump to navigationJump to search
No edit summary
(link to ML thread, add udev reload command, format heading.)
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 that udev event is not handled correctly in the target domain.
Most likely that udev event is not handled correctly in the target domain.
Line 14: Line 14:
All you need to do now 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 in target domain and restart udevd.
To automate this process, simply create a `cpu-online.rules` under /etc/udev/rules.d in target domain and tell udev to reload its rules with <code>udevadm control --reload-rules</code> (or restart udevd).


Content of `cpu-online.rules`:
Content of `cpu-online.rules`:
Line 23: Line 23:


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.
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.

=== Background ===

See this [http://lists.xen.org/archives/html/xen-devel/2010-05/msg00516.html mailing list thread] for discussion of the rationale for this behaviour


[[Category:Users]]
[[Category:Users]]

Revision as of 08:40, 27 June 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 tell udev to reload its rules with udevadm control --reload-rules (or 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.

Background

See this mailing list thread for discussion of the rationale for this behaviour