Skip to contentSkip to conversation

Question about VCPU's and VM's Blocked state

DISCUSSION Huibin QIAN 2 participants 2 messages Jan 19, 2010

lore
Share & tools
lore
#0 lore raw

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
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

2010/1/19 Huibin QIAN <[email protected]>:

Quoted 4 lines

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.

Quoted 2 lines

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