WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Question about VCPU's and VM's Blocked state

To: Huibin QIAN <qianhb@xxxxxxxxxx>
Subject: Re: [Xen-devel] Question about VCPU's and VM's Blocked state
From: George Dunlap <dunlapg@xxxxxxxxx>
Date: Tue, 19 Jan 2010 11:25:24 +0000
Cc: q00147403@xxxxxxxxxxxxxxxxxxxx, cqj@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, g00138124@xxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 19 Jan 2010 03:25:44 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=yq9QdPs5XREYGXqHYxJ6DvJ/ToM9ExmxASOrSwVQRtc=; b=FpND2apn4s4AM+xXGXsgh/CciVnp7ayX2iI5cRGSvhNE4pIVsmnDx6TYuhbIU9oVGC IEbS6zeGsKGejZp6IpWhq26JMJnGRGdBrAppY7CSMJ95/H7dc+5v+6v1PKWmK0ekv9Yy n4tQRsfGX7z/5IMrwa4sYba27A8MENzKB81aI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QWQenPF2inOolkB1RxG58WkyBXuxxZMN83SLxyo9lnwMOiLR2POiK4If/P56d9hNxj XVjwbmmeRnpJgSyxZIXf/uFOgJYAvQLKTJH7qnfcYyaW0umDYQ2a9YqYxzASzI65fzP5 T6O9D31lNInQFUbXK8ZPjHrwAH1oO3VUII4Eg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <002f01ca98ba$655b6d30$d738a60a@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <002f01ca98ba$655b6d30$d738a60a@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
2010/1/19 Huibin QIAN <qianhb@xxxxxxxxxx>:
> 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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>