Bug 499611 - Hotplugging vcpus to an F-11 64-bit Xen domU doesn't work
Summary: Hotplugging vcpus to an F-11 64-bit Xen domU doesn't work
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: udev
Version: 11
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11VirtTarget 523127 630947
TreeView+ depends on / blocked
 
Reported: 2009-05-07 12:42 UTC by Chris Lalancette
Modified: 2010-09-07 13:08 UTC (History)
13 users (show)

Fixed In Version: udev-145-13.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 523127 (view as bug list)
Environment:
Last Closed: 2010-06-28 12:24:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
CPU online patch (484 bytes, patch)
2009-05-20 16:28 UTC, Justin M. Forbes
no flags Details | Diff

Description Chris Lalancette 2009-05-07 12:42:04 UTC
Description of problem:
Following the test case here:

https://fedoraproject.org/wiki/QA:Testcase_Virtualization_XenDomU_CPU_hotplug

I'm trying to plug and unplug virtual CPUs from an F-11 x86_64 Xen guest.  I boot up the guest with 8 vcpus, and all 8 are shown in /proc/cpuinfo.  Then, on the dom0, I issue:

# xm vcpu-set f11 2

Which unplugs 6 of the vcpus.  Now only 2 cpus are shown in the guest.  However, if I now do:

# xm vcpu-set f11 8

Nothing happens.  What should happen is that we should hotplug 6 more vcpus into the guest, and now the guest should have the original 8 vcpus.

Comment 1 Chris Lalancette 2009-05-08 15:21:53 UTC
Justin,
     Another fairly important thing to get working in upstream and Fedora.

Chris Lalancette

Comment 2 Jeremy Fitzhardinge 2009-05-11 17:36:24 UTC
It needs some usermode support to work.  It will generate uevents, and a script is needed to do the actual onlining.  You can see that the cpus will appear and disappear in /sys/devices/system/cpu/present.

This is a behaviour change from older Xen kernels which did this internally, but seemed like the better approach.

Comment 3 Justin M. Forbes 2009-05-11 17:49:01 UTC
So I suppose the question here would be where should such a script live? With the pv_ops domU kernel, there is no difference in a PV domU install and a bare metal.

Comment 4 Jeremy Fitzhardinge 2009-05-11 17:57:48 UTC
Do you mean "which package" or "which filesystem"?

The idea is that this should be the same as a native system with hotplug physical cpus; you insert the CPU module, then a hotplug script actually onlines them.  There's nothing Xen-specific about the script or what it does.

(Though I'm not certain that real cpu hotplug works like this.)

Comment 5 Justin M. Forbes 2009-05-15 16:19:47 UTC
Right, so it appears that real hotplug can work like this just fine as well.  The real question: is there any reason we should not make udev online cpus on an add?  The arguments I have seen against this are power consumption related.  Udev certainly gets events on the CPU add or removal, and making it online a CPU on add would be trivial.  It has certainly changed from a mechanism question to a policy question.

Comment 6 Daniel Berrangé 2009-05-15 16:31:06 UTC
The uevents / sysfs  notication/online Jeremy mentions in comment #2, sounds like exactly the same thing Glauba came up against when trying todo KVM CPU hotplug. I can't remember whether he ended up using this or not, but it would make sense for us to have same CPU onlining process for KVM and Xen guests if practical.

Comment 7 Justin M. Forbes 2009-05-15 16:43:42 UTC
kvm would work the same way.  Essentially it is a udev rule.  After thinking on it a bit, I believe the rule is necessary.  I find it hard to believe that people who really care about power management would add a CPU to a running system without a desire to online that CPU.  Most power management would be achieved by taking existing CPUs online or offline without attaching or removing them.  The udev rule would only online a CPU when it is attached, meaning CPUs that you specifically offline but leave present would not change state.

Comment 8 Justin M. Forbes 2009-05-20 16:28:44 UTC
Created attachment 344840 [details]
CPU online patch

Attached a patch which automatically onlines CPUs as they are added.  Tested with several add and removes on F-11.

Comment 9 Bug Zapper 2009-06-09 15:19:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Harald Hoyer 2009-06-30 11:12:08 UTC
Why does the kernel not bring the CPUs online? Aren't real CPUs brought online immediately?

Comment 11 Justin M. Forbes 2009-09-25 15:20:10 UTC
Not sure to be honest, but there is no harm in onlining an already online cpu.  And I suspect that virt users are far more likely to hotplug CPUs than bare metal.

Comment 12 Bug Zapper 2010-04-27 14:10:52 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 13 Harald Hoyer 2010-04-28 06:43:32 UTC
should be fixed.. bug is in "MODIFIED"

Comment 14 Andrew Jones 2010-04-28 07:37:25 UTC
Oops, sorry, I shot from the hip here when I bumped this up to f13. I forgot this bug was for host physical cpu hotplug, not guest vcpu hotplug. Resetting this to 11 to allow it to be CLOSED.

Comment 15 Bug Zapper 2010-06-28 12:24:46 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.