Huibin QIAN
2010-Jan-19 03:49 UTC
[Xen-devel] Question about VCPU''s and VM''s Blocked state
I have some doubt about the vcpu scheduling in xen. what would make the vcpu be blocked? In HVM, does the hlt instruction make a vmexit and the hypervisor put the vcpu into sleep queue? Or anything else causes it? What about the PV? When we use ''xm list'' we can get the vm state ,usually it is blocked or running, and what meaning is the blocked state? Is that mean all the vcpus blonged to this domain are in the sleep queue? Thanks _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
George Dunlap
2010-Jan-19 11:25 UTC
Re: [Xen-devel] Question about VCPU''s and VM''s Blocked state
2010/1/19 Huibin QIAN <qianhb@huawei.com>:> I have some doubt about the vcpu scheduling in xen. > what would make the vcpu be blocked? > In HVM, does the hlt instruction make a vmexit and the hypervisor put the > vcpu into sleep queue? Or anything else causes it? What about the PV?HVM vcpus become blocked when they execute HLT. PV vcpus become blocked when they execute a SCHEDOP_block(). (See xen/common/schedule.c). By contrast, "offline" is the runstate that happens when the vcpu is not runnable for any other reason; for example: * While a domain is being constructed * An HVM domain waiting for qemu to finish an emulated instruction (IO or MMIO) * When a vcpu is flagged for scheduler migration to a different pcpu * When a vcpu is being paused for another reason, for example during live migration to another host.> When we use ''xm list'' we can get the vm state ,usually it is blocked or > running, and what meaning is the blocked state?Not sure about this one. But there is no "sleep queue"; vcpus that are blocked are simply not on the run queue (or running). -George _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel