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: Re: [Xen-devel] need help about CPU offline/hotplug in Xen Unstable

To: "Ke, Liping" <liping.ke@xxxxxxxxx>
Subject: Re: Re: [Xen-devel] need help about CPU offline/hotplug in Xen Unstable
From: Ting Shen <christieshum@xxxxxxxxx>
Date: Wed, 13 May 2009 13:40:51 +0800
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 12 May 2009 22:41:22 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=8nbCqJIK9W4nCVEMK2vhb8FqmzhJRJmNI7xuhZvbxG4=; b=B4YpneLq/BDfYBVN2FtbcOi0ZdRBDE8QVN3XVRpBr/QbtcpqgU2jYQf5QdaIk5Cwhw 2B8DqqPWWK5kvCOU5GyLwrehPquXm/M3PE9zrQECOMBUwZdLEAzOGTLXeYfGSdAXPrms Pk+VrN6+FAuLny/7CSEeyCUhcJ4MqsAEOqw/4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=gQdKGdSUznXYfhUcWugdMvNWQUt45r3ElQpWgiVJ78A1yIT/whRi6BJ3WTGxDMwkmK 50glMhyOVMtOzm2DLQhiyzmtF/9vvQ67sn3D82PY9UfBPBia1ev47Aaw1PyZWtfUvB/y bUQkQja8IGpd2SRPudb8GF+ScBqfPpfbsgQ4s=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E2263E4A5B2284449EEBD0AAB751098402C4E34470@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <C62F4E18.AC8C%keir.fraser@xxxxxxxxxxxxx> <001636417937785f4c0469c3a84c@xxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098402C4E34470@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Yes, It works well. Thank you very much indeed!

2009/5/13 Ke, Liping <liping.ke@intel.com>
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
>
>
>
>
>



--
Yours Sincerely,
Ting Shen
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel