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/
Home Products Support Community News


Re: [Xen-devel] Question about the ability of credit scheduler to handle

To: Yuehai Xu <yuehaixu@xxxxxxxxx>
Subject: Re: [Xen-devel] Question about the ability of credit scheduler to handle I/O and CPU intensive VMs
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Tue, 5 Oct 2010 16:02:05 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, yhxu@xxxxxxxxx
Delivery-date: Tue, 05 Oct 2010 08:02:52 -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=ECv3IUhKDk+8K3E1ie/8pAlMA/WmIS7hDgWfbS5RhkA=; b=whWq5VwJ10IgN8UZgxAuE44b7uJA0ft+rIGmigS83KkN9974TxuiitHQpaJsyEKhVA EjpOoKnTYCYZ6NbZblEzJlcPwLL3/o2jkgK42ttsJsRjQZM1NrDlw2W/LCgV14ijpHCk 4sq69rzZ7ayKYv+4NJFLAcMVOlpdmnE3Sib+8=
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=uCo+QnAf+ckucb4YbSlYdLbasyztNUb5Ubpsa6w8n1le59QlH52K5inzdAQBhsLnTc cuXtcJ85uNs6k71twbcLcYH6r4EHsBOvELgMihO1EHDTnvSDx0BfZdz5lz38ISkEQiBd YIl+f0zRv90JOOB72yFV4ZEPARJUHy7BPdYps=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTinCbnzLLtNpdQe0x387UeDcy3SzrmffZw1oQAJo@xxxxxxxxxxxxxx>
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: <AANLkTi=Ro24zg-yDPk1+=c0XsZSe2kNn8Gk07Bu4x0WN@xxxxxxxxxxxxxx> <AANLkTin9E1m_jFcj4Ak7nB9OxcQynrznpQ_nNPi_U7hN@xxxxxxxxxxxxxx> <AANLkTikBWZdpOviSEQSNi_pf66A+zYW8FyQVjiCX8ojm@xxxxxxxxxxxxxx> <AANLkTi=Oa0_=vXrr63eALBU2sQa3aLV0NiQHt8hPPvcw@xxxxxxxxxxxxxx> <AANLkTimYTbf5meNptCtuiKWfQGd_qSNCkbCNabfREc_0@xxxxxxxxxxxxxx> <AANLkTintdF5h0-YD6FxjX0dapfbQYdAcK2P-=wHXnBiC@xxxxxxxxxxxxxx> <AANLkTinCbnzLLtNpdQe0x387UeDcy3SzrmffZw1oQAJo@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Oct 5, 2010 at 3:56 PM, Yuehai Xu <yuehaixu@xxxxxxxxx> wrote:
> I know in the kernel of Linux, when a process is stocked because of
> I/O, it will be deleted from runnable queue, so that the scheduler of
> CPU can select next runnable process immediately. However, I thought
> this was different from the scheduling of XEN. Since the scheduler
> didn't really know whether the VCPU was consuming PCPU, it just
> provided a certain period of time to the VM. I might be wrong. If it
> is true, even a most idle VM should always consumes as the same PCPU
> time as the busy one  in my scheduler. But the result is opposite. The
> idle VM consumes much less PCPU then the busy one. This should not be
> determined by the scheduling itself, otherwise, the idle one should
> also have 50% PCPU. Then, what mechanism cause this result?

Your understanding of Xen is not correct.  In Xen, the VM itself will
initiate blocking if there is nothing for it to do.  PV domains call
SCHED_OP_block(), which will cause the VM to block until it is woken
by an event channel; and HVM domains will execute the HLT instruction,
which will cause the VM to block until it is woken by an interrupt.

If you do a more complete trace (i.e., "xentrace -e all") and look at
the results with xenalyze, you'll see dom2 making a sched_op
hypercall, then transitioning from RUNSTATE_running to


Xen-devel mailing list

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