WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] cpu_down() but no cpu_up() in drivers/xen/cpu_hotplug.c ?
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 13 May 2010 10:48:40 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Wed, 12 May 2010 19:50:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BEAD6C0.9010902@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4BE940C80200007800002410@xxxxxxxxxxxxxxxxxx> <1273571127.7572.2905.camel@xxxxxxxxxxxxxxxxxxxxxx> <4BE9967F.7080409@xxxxxxxx> <789F9655DD1B8F43B48D77C5D30659731E5F1EEC@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4BEAD6C0.9010902@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acrx7+oZBzVc88fERoWGN2jf1OSD5AAVhQRA
Thread-topic: [Xen-devel] cpu_down() but no cpu_up() in drivers/xen/cpu_hotplug.c ?

>-----Original Message-----
>From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
>Sent: Thursday, May 13, 2010 12:27 AM
>To: Jiang, Yunhong
>Cc: Ian Campbell; xen-devel@xxxxxxxxxxxxxxxxxxx; Jan Beulich
>Subject: Re: [Xen-devel] cpu_down() but no cpu_up() in 
>drivers/xen/cpu_hotplug.c ?
>
>On 05/11/2010 08:25 PM, Jiang, Yunhong wrote:
>>> 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?).
>>>
>> I remember for cpu remove, the xen's vcpu is different to native method. In 
>> native,
>it will only trigger a uevent to user space (at least in version like 2.6.31), 
>while for
>xen vcpu, it will remove the vcpu directly.
>>
>
>I would think that Xen and native are much the same; if you pull out a

I suspect if native has tested the CPU hotmove. But at least from the code in 
container_notify_cb() at drivers/acpi/container.c, seems it will trigger a 
uevent to user space and the user space will take action (mostly through eiject 
entry under sysfs, I think). But still I don't know if this has been tested on 
native environment. So maybe the difference from xen vcpu does not matter.

    case ACPI_NOTIFY_DEVICE_CHECK:
        printk(KERN_WARNING "Container driver received %s event\n",
               (type == ACPI_NOTIFY_BUS_CHECK) ?
               "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK");
        status = acpi_bus_get_device(handle, &device);
        if (present) {
            if (ACPI_FAILURE(status) || !device) {
                result = container_device_add(&device, handle);
                if (!result)
                    kobject_uevent(&device->dev.kobj,
                               KOBJ_ONLINE);
                else
                    printk(KERN_WARNING
                           "Failed to add container\n");
            }
        } else {
            if (ACPI_SUCCESS(status)) {
                /* device exist and this is a remove request */
                kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
            }
        }

>physical CPU from the system, that's in no way advisory ;)  Similarly,
>if you remove a vcpu from a guest, that's an external policy being
>imposed onto the guest, and it doesn't get much say in the matter,
>beyond being able to clean up before the vcpu goes away.
>
>If the domain wants to stop using a vcpu, it can simply do that by
>soft-downing the vcpu, but it remains attached to the domain (again,
>analogous to the native case).
>
>    J
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel