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

Re: [Xen-devel] How does the Xen kernel change the vcpu number of a domain?



On Fri, Jun 13, 2014 at 10:36:25PM +0800, Bei Guan wrote:
> 2014-06-13 16:59 GMT+08:00 Wei Liu <wei.liu2@xxxxxxxxxx>:
> 
> > 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?
> 

I suspect that has something to do with HVM domain. But I'm not at all
familiar with qemu-trad so it's up to you to find out. :-/

Wei.

> Thank you very much.
> 
> 
> 
> > Wei.
> >
> > > Any reply is appreciated. Thank you all very much.
> > >
> > > --
> > > Best Regards,
> > > Bei Guan
> >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@xxxxxxxxxxxxx
> > > http://lists.xen.org/xen-devel
> >
> >
> 
> 
> -- 
> Best Regards,
> Bei Guan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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