From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ting Shen Subject: Re: Re: need help about CPU offline/hotplug in Xen Unstable Date: Wed, 13 May 2009 13:40:51 +0800 Message-ID: <765824370905122240w12ead828n94352c2e2cea17c0@mail.gmail.com> References: <001636417937785f4c0469c3a84c@google.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0583500685==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Ke, Liping" Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org --===============0583500685== Content-Type: multipart/alternative; boundary=0016368e1b117914140469c4a7f5 --0016368e1b117914140469c4a7f5 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Yes, It works well. Thank you very much indeed! 2009/5/13 Ke, Liping > please try below test code piece. Hope it could help you. > > Thanks& Regards, > Criping > > #include > #include > > #include > > int main(int argc, char *argv[] ) > { > int cpu, xc_id; > if ( argc < 2) { > printf("Please input offline CPU-id\n"); > exit(0); > } > cpu =3D atoi(argv[1]); > printf("Offline CPU %d\n", cpu); > xc_id =3D xc_interface_open(); > xc_cpu_offline(xc_id, cpu); > printf("CPU offlined\n"); > xc_interface_close(xc_id); > return 0; > } > > ------------------------------ > *From:* xen-devel-bounces@lists.xensource.com [mailto: > xen-devel-bounces@lists.xensource.com] *On Behalf Of * > ChristieShum@gmail.com > *Sent:* 2009=C4=EA5=D4=C213=C8=D5 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 wrote: > > On 12/05/2009 15:47, "Ting Shen" christieshum@gmail.com> wrote: > > > > > > > > > Then I downloaded the stable version from xen.org http://xen.org> an= d > > > > > 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 > > > > > > > > > > > --=20 Yours Sincerely, Ting Shen --0016368e1b117914140469c4a7f5 Content-Type: text/html; charset=GB2312 Content-Transfer-Encoding: quoted-printable 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=20 you.
 
Thanks& Regards,
Criping
 
#include <stdio.h>
#include=20 <stdlib.h>
 =
#include <xenctrl.h>
 =
int main(int argc, char *argv[]=20 )
{
    int cpu, xc_id;
    if ( arg= c=20 < 2) {
        printf("Please= input=20 offline CPU-id\n");
       =20 exit(0);
    }
    cpu =3D=20 atoi(argv[1]);
    printf("Offline CPU %d\n",= =20 cpu);
    xc_id =3D xc_interface_open();
  &= nbsp;=20 xc_cpu_offline(xc_id, cpu);
    printf("CPU=20 offlined\n");
   =20 xc_interface_close(xc_id);
    return=20 0;
}


From: xen-devel-bounces@lists.xenso= urce.com=20 [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of=20 ChristieShu= m@gmail.com
Sent: 2009=C4=EA5=D4=C213=C8=D5 12:30
To:=20 Xen-devel
Subject: Re: Re: [Xen-devel] need help about CPU=20 offline/hotplug in Xen Unstable

Thanks a lot.
Is there a sample or tutorial for how to implem= ent=20 the offline process using this library?

On May 12, 2009 11:02pm, Kei= r=20 Fraser <k= eir.fraser@eu.citrix.com> wrote:
> On 12/05/2009 15:47,=20 "Ting Shen" christieshum@gmail.com> wrote:
>
>
>
= >=20 > Then I downloaded the stable version from xen.org h= ttp://xen.org>=20  and
>
> > installed.
>
> > But since = the=20 document is not updated, I don't know the detail method to
>
= > >=20 offline a physical CPU.
>
>
>
> It's availab= le as a=20 library function (xc_cpu_offline) but not actually
>
> plumbed= into=20 a xm command, or other tool.
>
>
>
>  --=20 Keir
>
>
>
>
>



--
Yours Sincerely,
Tin= g Shen
--0016368e1b117914140469c4a7f5-- --===============0583500685== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0583500685==--