From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bei Guan Subject: Re: How does the Xen kernel change the vcpu number of a domain? Date: Fri, 13 Jun 2014 22:36:25 +0800 Message-ID: References: <20140613085924.GA5227@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0636303354587232795==" Return-path: In-Reply-To: <20140613085924.GA5227@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============0636303354587232795== Content-Type: multipart/alternative; boundary=089e013d05022170ba04fbb89a11 --089e013d05022170ba04fbb89a11 Content-Type: text/plain; charset=UTF-8 2014-06-13 16:59 GMT+08:00 Wei Liu : > On Fri, Jun 13, 2014 at 03:19:08PM +0800, Bei Guan wrote: > > Hi All, > > > > I try to figure out that how the command "xl vcpu-set" works. I find out > > that the command "xl vcpu-set" calls the method > > libxl__set_vcpuonline_xenstore() to set the state of the vcpu in the > > Xenstore path /local/domain_id/cpu/vcpu_id/availability. The value of the > > key "availability" is set to "online" while the the vcpu number will > > increase. When the key is set to "offline" the vcpu number will decrease. > > > > What I want to know is how does the vcpu number increase/decrease > according > > to the vcpu state in the Xenstore? How can I find the method that really > > does the work? > > > > Linux kernel code drivers/xen/cpu_hotplug.c. It sets up a xenstore watch > for "cpu" xenstore node and handles event accordingly. > > Thank you very much for your reply. I'm using Xen-4.1.2. I also find that the Xen code tools/ioemu-qemu-xen/xenstore.c sets a Xenstore watch for /loca/domain/domid/cpu. It handles the watch event in the method xenstore_procees_vcpu_set_event(char **vec). So, what's difference between the two Xenstore watch in the Linux kernel and qemu-xen? Is the Xenstore watch in qemu-xen for HVM domains that are without PV drivers? Thank you very much. > Wei. > > > Any reply is appreciated. Thank you all very much. > > > > -- > > Best Regards, > > Bei Guan > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel > > -- Best Regards, Bei Guan --089e013d05022170ba04fbb89a11 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



2014-06-13 16:59 GMT+08:00 Wei Liu <wei.liu2@citrix.com><= /span>:
On Fri, Jun 13, 2014 at 03:1= 9:08PM +0800, Bei Guan wrote:
> Hi All,
>
> I try to figure out that how the command "xl vcpu-set" works= . I find out
> that the command "xl vcpu-set" calls the method
> libxl__set_vcpuonline_xenstore() to set the state of the vcpu in the > Xenstore path /local/domain_id/cpu/vcpu_id/availability. The value of = the
> key "availability" is set to "online" while the th= e vcpu number will
> increase. When the key is set to "offline" the vcpu number w= ill decrease.
>
> What I want to know is how does the vcpu number increase/decrease acco= rding
> to the vcpu state in the Xenstore? =C2=A0How can I find the method tha= t really
> does the work?
>

Linux kernel code drivers/xen/cpu_hotplug.c. It sets up a xenstore wa= tch
for "cpu" xenstore node and handles event accordingly.

Thank you very much for your reply.
I'm= using Xen-4.1.2. I also find that the Xen code tools/ioemu-qemu-xen/xensto= re.c sets a Xenstore watch for /loca/domain/domid/cpu. It handles the watch= event in the method xenstore_procees_vcpu_set_event(char **vec). So, what&= #39;s difference between the two Xenstore watch in the Linux kernel and qem= u-xen? Is the Xenstore watch in qemu-xen for HVM domains that are without P= V drivers?

Thank you very much.

=C2=A0
Wei.

> Any reply is appreciated. Thank you all very much.
>
> --
> Best Regards,
> Bei Guan

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org=
> http://li= sts.xen.org/xen-devel




--
Best Regards= ,
Bei Guan
--089e013d05022170ba04fbb89a11-- --===============0636303354587232795== 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.xen.org http://lists.xen.org/xen-devel --===============0636303354587232795==--