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

RE: Re: [Xen-devel] need help about CPU offline/hotplug in Xen Unstable


  • To: "ChristieShum@xxxxxxxxx" <ChristieShum@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Ke, Liping" <liping.ke@xxxxxxxxx>
  • Date: Wed, 13 May 2009 12:55:36 +0800
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc:
  • Delivery-date: Tue, 12 May 2009 21:56:53 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcnTg3P9fJLVpG9+TTWYLmA/pnoUlAAA13og
  • Thread-topic: Re: [Xen-devel] need help about CPU offline/hotplug in Xen Unstable

please try below test code piece. Hope it could help you.
 
Thanks& Regards,
Criping
 
#include <stdio.h>
#include <stdlib.h>
 
#include <xenctrl.h>
 
int main(int argc, char *argv[] )
{
    int cpu, xc_id;
    if ( argc < 2) {
        printf("Please input offline CPU-id\n");
        exit(0);
    }
    cpu = atoi(argv[1]);
    printf("Offline CPU %d\n", cpu);
    xc_id = xc_interface_open();
    xc_cpu_offline(xc_id, cpu);
    printf("CPU offlined\n");
    xc_interface_close(xc_id);
    return 0;
}


From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of ChristieShum@xxxxxxxxx
Sent: 2009年5月13日 12:30
To: Xen-devel
Subject: Re: Re: [Xen-devel] need help about CPU offline/hotplug in Xen Unstable

Thanks a lot.
Is there a sample or tutorial for how to implement the offline process using this library?

On May 12, 2009 11:02pm, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 12/05/2009 15:47, "Ting Shen" christieshum@xxxxxxxxx> wrote:
>
>
>
> > Then I downloaded the stable version from xen.org http://xen.org>  and
>
> > installed.
>
> > But since the document is not updated, I don't know the detail method to
>
> > offline a physical CPU.
>
>
>
> It's available as a library function (xc_cpu_offline) but not actually
>
> plumbed into a xm command, or other tool.
>
>
>
>  -- Keir
>
>
>
>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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