[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Question about the ability of credit scheduler to handle I/O and CPU intensive VMs


  • To: Yuehai Xu <yuehaixu@xxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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
RUNSTATE_blocked.

 -George

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.