From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?GB2312?B?yfL2qg==?= Subject: need help about CPU offline/hotplug in Xen Unstable Date: Tue, 12 May 2009 22:44:17 +0800 Message-ID: <765824370905120744w6bad9796mec5b445aee12e4e4@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1710519434==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1710519434== Content-Type: multipart/alternative; boundary=000e0cd14dee1948940469b821e5 --000e0cd14dee1948940469b821e5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've noticed this section in Xen 3.4 News( http://mail-index.netbsd.org/port-xen/2009/03/02/msg004800.html): CPU offline/hotplug: Xen 3.4 can offline physical CPUs on CPU-core granularity. CPU hotplugging works on CPU granularity. It's meant as an recover-action for the case of machine-check errors. This feature requires Dom0 support to utilize it. This feature has been almost tested on Intel-CPUs only. Then I downloaded the stable version from xen.org and installed. But since the document is not updated, I don't know the detail method to offline a physical CPU. Can anyone give me the hint? Thanks very much! -- Yours Sincerely, Ting Shen --000e0cd14dee1948940469b821e5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I've noticed this section in Xen 3.4 News(http://mail-index.netbsd.org= /port-xen/2009/03/02/msg004800.html):
CPU offline/hotplug: Xen =
3.4 can offline
physical CPUs on CPU-core granularity.
CPU hotplugging works on CPU gran= ularity.
It's meant as an recover-action for the case
of machine-= check errors. This feature
requires Dom0 support to utilize it.
This = feature has been almost tested
on Intel-CPUs only.

Then I downloaded the stable version from xen.org and installed.
But since the document i= s not updated, I don't know the detail method to offline a physical CPU= .

Can anyone give me the hint? Thanks very much!
--
Yours Si= ncerely,
Ting Shen
--000e0cd14dee1948940469b821e5-- --===============1710519434== 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 --===============1710519434==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ting Shen Subject: need help about CPU offline/hotplug in Xen Unstable Date: Tue, 12 May 2009 22:47:37 +0800 Message-ID: <765824370905120747v47912fe8w1825964f97787ffe@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1963667810==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1963667810== Content-Type: multipart/alternative; boundary=000e0cd2176c0a46c80469b82d84 --000e0cd2176c0a46c80469b82d84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I've noticed this section in Xen 3.4 News( http://mail-index.netbsd.org/port-xen/2009/03/02/msg004800.html): CPU offline/hotplug: Xen 3.4 can offline physical CPUs on CPU-core granularity. CPU hotplugging works on CPU granularity. It's meant as an recover-action for the case of machine-check errors. This feature requires Dom0 support to utilize it. This feature has been almost tested on Intel-CPUs only. Then I downloaded the stable version from xen.org and installed. But since the document is not updated, I don't know the detail method to offline a physical CPU. Can anyone give me the hint? Thanks very much! -- Yours Sincerely, Ting Shen --000e0cd2176c0a46c80469b82d84 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I've noticed this section in Xen 3.4 News(http://mail-index.netbsd.org= /port-xen/2009/03/02/msg004800.html):

CPU offline/hotplug: Xen 3= .4 can offline

physical CPUs on CPU-core granularity.
CPU hotplugging works on CPU = granularity.
It's meant as an recover-action for the case
of mach= ine-check errors. This feature
requires Dom0 support to utilize it.
This feature has been almost tested

on Intel-CPUs only.

Then = I downloaded the stable version from xen.org= and installed.
But since the document is not updated, I don't know = the detail method to offline a physical CPU.


Can anyone give me the hint? Thanks very much!
--
Yours Sincerely,
Ting Shen
--000e0cd2176c0a46c80469b82d84-- --===============1963667810== 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 --===============1963667810==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: need help about CPU offline/hotplug in Xen Unstable Date: Tue, 12 May 2009 16:02:32 +0100 Message-ID: References: <765824370905120747v47912fe8w1825964f97787ffe@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <765824370905120747v47912fe8w1825964f97787ffe@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ting Shen , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 12/05/2009 15:47, "Ting Shen" wrote: > Then I downloaded the stable version from 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jiang, Yunhong" Subject: RE: need help about CPU offline/hotplug in Xen Unstable Date: Wed, 13 May 2009 10:01:56 +0800 Message-ID: References: <765824370905120747v47912fe8w1825964f97787ffe@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Ting Shen , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org We have a tools to achieve that (i.e. xm command). But as Xen tree is close= d now, so we are waiting for it be open again and will send it out. --jyh xen-devel-bounces@lists.xensource.com wrote: > On 12/05/2009 15:47, "Ting Shen" wrote: >=20 >> Then I downloaded the stable version from xen.org =20 >> and installed. But since the document is not updated, I don't know >> the detail method to offline a physical CPU. >=20 > It's available as a library function (xc_cpu_offline) but not actually > plumbed into a xm command, or other tool. >=20 > -- Keir >=20 >=20 >=20 > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel= From mboxrd@z Thu Jan 1 00:00:00 1970 From: ChristieShum@gmail.com Subject: Re: Re: need help about CPU offline/hotplug in Xen Unstable Date: Wed, 13 May 2009 04:29:32 +0000 Message-ID: <001636417937785f4c0469c3a84c@google.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0341768830==" 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: Xen-devel List-Id: xen-devel@lists.xenproject.org --===============0341768830== Content-Type: multipart/alternative; boundary=001636417937785f2e0469c3a849 --001636417937785f2e0469c3a849 Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit 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> 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 --001636417937785f2e0469c3a849 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks a lot.
Is there a sample or tutorial for how to implement the o= ffline process using this library?

On May 12, 2009 11:02pm, Keir= Fraser <keir.fraser@eu.citrix.com> 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> =A0and
>
> > installed.
>
> > But since the document is not updated, I don't k= now the detail method to
>
> > offline a physical CPU.<= br />>
>
>
> It's available as a library = function (xc_cpu_offline) but not actually
>
> plumbed int= o a xm command, or other tool.
>
>
>
> = =A0-- Keir
>
>
>
>
> --001636417937785f2e0469c3a849-- --===============0341768830== 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 --===============0341768830==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Ke, Liping" Subject: RE: Re: need help about CPU offline/hotplug in Xen Unstable Date: Wed, 13 May 2009 12:55:36 +0800 Message-ID: References: <001636417937785f4c0469c3a84c@google.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1425101011==" Return-path: In-Reply-To: <001636417937785f4c0469c3a84c@google.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "ChristieShum@gmail.com" , Xen-devel List-Id: xen-devel@lists.xenproject.org --===============1425101011== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_E2263E4A5B2284449EEBD0AAB751098402C4E34470PDSMSX501ccrc_" --_000_E2263E4A5B2284449EEBD0AAB751098402C4E34470PDSMSX501ccrc_ Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 cGxlYXNlIHRyeSBiZWxvdyB0ZXN0IGNvZGUgcGllY2UuIEhvcGUgaXQgY291bGQgaGVscCB5b3Uu DQoNClRoYW5rcyYgUmVnYXJkcywNCkNyaXBpbmcNCg0KI2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5j bHVkZSA8c3RkbGliLmg+DQoNCiNpbmNsdWRlIDx4ZW5jdHJsLmg+DQoNCmludCBtYWluKGludCBh cmdjLCBjaGFyICphcmd2W10gKQ0Kew0KICAgIGludCBjcHUsI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o0NywgIlRpbmcg U2hlbiIgY2hyaXN0aWVzaHVtQGdtYWlsLmNvbT4gd3JvdGU6DQo+DQo+DQo+DQo+ID4gVGhlbiBJ IGRvd25sb2FkZWQgdGhlIHN0YWJsZSB2ZXJzaW9uIGZyb20geGVuLm9yZyBodHRwOi8veGVuLm9y Zz4gIGFuZA0KPg0KPiA+IGluc3RhbGxlZC4NCj4NCj4gPiBCdXQgc2luY2UgdGhlIGRvY3VtZW50 IGlzIG5vdCB1cGRhdGVkLCBJIGRvbid0IGtub3cgdGhlIGRldGFpbCBtZXRob2QgdG8NCj4NCj4g PiBvZmZsaW5lIGEgcGh5c2ljYWwgQ1BVLg0KPg0KPg0KPg0KPiBJdCdzIGF2YWlsYWJsZSBhcyBh IGxpYnJhcnkgZnVuY3Rpb24gKHhjX2NwdV9vZmZsaW5lKSBidXQgbm90IGFjdHVhbGx5DQo+DQo+ IHBsdW1iZWQgaW50byBhIHhtIGNvbW1hbmQsIG9yIG90aGVyIHRvb2wuDQo+DQo+DQo+DQo+ICAt LSBLZWlyDQo+DQo+DQo+DQo+DQo+DQo= --_000_E2263E4A5B2284449EEBD0AAB751098402C4E34470PDSMSX501ccrc_ Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
please try below test code piece. Hope it could he= lp=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 inpu= t=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.xensource= .com=20 [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of=20 ChristieShum@gmail.com
Sent: 2009=C4=EA5=D4=C213=C8=D5 12:30<= BR>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 <keir.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 http://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 available a= s a=20 library function (xc_cpu_offline) but not actually
>
> plumbed= into=20 a xm command, or other tool.
>
>
>
>  --=20 Keir
>
>
>
>
> --_000_E2263E4A5B2284449EEBD0AAB751098402C4E34470PDSMSX501ccrc_-- --===============1425101011== 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 --===============1425101011==-- 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==--