[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] cpu_down() but no cpu_up() in drivers/xen/cpu_hotplug.c ?

On 05/11/2010 02:45 AM, Ian Campbell wrote:
> The original commit which added CPU hotplug to pvops says:
>     xen: implement CPU hotplugging
>     Note the changes from 2.6.18-xen CPU hotplugging:
>     A vcpu_down request from the remote admin via Xenbus both hotunplugs the
>     CPU, and disables it by removing it from the cpu_present map, and removing
>     its entry in /sys.
>     A vcpu_up request from the remote admin only re-enables the CPU, and does
>     not immediately bring the CPU up. A udev event is emitted, which can be
>     caught by the user if he wishes to automatically re-up CPUs when 
> available,
>     or implement a more complex policy.
>     Signed-off-by: Alex Nixon <alex.nixon@xxxxxxxxxx>
>     Acked-by: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
>     Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
> I'm not sure how the decision was reached to implement it this way,
> perhaps for consistency with CPU hotplug on other
> platforms/architectures?

Yes, it was to make it consistent with native physical CPU hotplug.  It
also replaced some other xen-specific mechanism to allow the domain to
control when the cpu was actually added (I forget the details; something
like "cpus allowed" vs "cpus active" or something?).

> FWIW I use a udev rule to bring up CPUs as they are added, which is
> equivalent to the old behaviour:
>         ACTION=="add", SUBSYSTEM=="cpu", RUN+="/bin/sh -c '[ ! -e 
> /sys$devpath/online ] || echo 1 > /sys$devpath/online'"

Fedora and RHEL have been shipping with something like this for a while.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.