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] Offline state in scheduling

To: duyuyang@xxxxxxxxx
Subject: Re: [Xen-devel] Offline state in scheduling
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Mon, 28 Jun 2010 10:46:27 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 28 Jun 2010 02:47:22 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Q+0yXSBg1j1ogLFJyx2jimZIG094RqUSuiP27T5G73g=; b=obnVEAQWrS9RMHdrMEdiugnK2mhKdpldjErILDBTbvyKupG18xCgWWu/zt7lk6i+c9 sD7zISciVcSgzcmM2ESq8QsmNx5ckFLSkNLF/HhBAvEUjcec/TmGki2oIiwQE/ibLoLy PlluKA4FX0hA6ZzFyF02XLZ06QDi8k7JvBFiQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=ebziuYPe+H7A+uJOgE9qmnQc/oiP3/JcGEYMIDJY1eNDJ08hr7srrxKzsKBAm9GcNe oTGgpohBVPsYFxgJDCzekhrdyxSl43/MtVKv7mSK1hCZatqgzw18Zn2TJeXetRrDfX/t wVDPglnD4vqxqUaGL7aVrFv3wwJgO51foNXJw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201006281159133905493@xxxxxxxxx>
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: <201006281159133905493@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Jun 28, 2010 at 4:59 AM, Yuyang Du <duyuyang@xxxxxxxxx> wrote:
> Hi,
>
> By xentrace, I saw there are many offline states in VCPU scheduling, more in 
> HVMs than PV kernels. The comments say that offline means the VCPU is not 
> runnable but not blocked (like hotplug and pauses by the system administrator 
> or for critical sections in the hypervisor).
>
> Can anyone explain it to me what are the circumstances except for hotplug and 
> pauses by the system administrator? And what are the critical sections in the 
> hypervisor?

Essentially, offline means "Not runnable for any reason other than the
guest voluntarily blocking" (either with the SCHED_block hypercall or
executing the HLT instruction).

The main reason for HVM vcpus going offline is to do QEMU-related I/O:
the guest vcpu executes the PIO or MMIO instruction, it traps to Xen,
Xen decides to pass it on to QEMU.  So it pauses the vcpu, and sends
info about the instruction to QEMU.  QEMU in dom0 wakes up, handles
the event, and completes the I/O, making the vcpu runnable again.
When the vcpu runs again, Xen moves the IP forward and does whatever
is appropriate to the registers (e.g., fills them with the value of
the read supplied by QEMU).

If you use xenalyze (http://xenbits.xensource.com/ext/xenalyze.hg), it
will give you a break-down of exactly how much time is spent per vcpu
in running, runnable, blocked, and offline states.  It will also tell
you how much time is spent handling MMIO and PIO per vcpu.  The time
spent in offline state for HVM domains should closely correlate to the
time offline.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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