public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: 刘志建 <aleck_liu@163.com>
Cc: kvm@vger.kernel.org, anthony@codemonkey.ws
Subject: Re: Is guest OS oriented scheduling welcome?
Date: Wed, 22 Apr 2009 15:22:54 +0300	[thread overview]
Message-ID: <49EF0C1E.2060203@redhat.com> (raw)
In-Reply-To: <1060494.867561240402736300.JavaMail.coremail@app167.163.com>

刘志建 wrote:
> Hello folks,
> In the past, it was said KVM would like to treat the guest OS threads differently in scheduling. However, till now, the qemu thread is regarded as a conventional user thread. Therefore, it is hard to control how much CPU slices one guest OS can utilize. I don't think a computing cloud provider likes this idea.
> And, what's more, "Xen and Co.: Communication-aware CPU Scheduling for Consolidated Xen-based Hosting Platforms"(http://www.cse.psu.edu/~sgovinda/papers/vee07.pdf) has shown that the standard thread scheduling in Linux might not fit the virtualization environment well.
> I have ported Xen's credit scheduler to KVM.

Do you mean, to KVM, or to the Linux scheduler?

>  With my work, the users can control how much CPU a guest OS can occupy.
> The principles are:
> 1. all the vcpu threads are declared as FIFO RealTime threads;
> 2. before a vcpu thread enters guest mode, its blackboard is checked first, to see if the scheduler wants it to continue. If the vcpu thread has a bad luck, it will give up cpu and waits for permission.
> 3. there is a per-cpu scheduler, which is triggered periodically by its timer. The scheduler writes the scheduling results to the interested party's blackboards. To those that get the permission, the scheduler will try to wake them up in case of their sleeping. 
> 4. In order to port Xen's scheduler, the host Linux is treated as a virtual machine too. However, it never checks its blackboard.
> 5. a user level per-VM credit control mechanism is implemented, to allow users to dynamically adjust a virtual machine's CPU quota.
> Although a vcpu might continue to run for a while after the scheduler has decided that it should actually yield the cpu, our experiments show that this brings trival influence.
> The interaction-oriented scheduling are going to be ported/developed.
>
> If KVM welcomes this function, I will post it out.
>

I think this is very interesting, but should be integrated with the 
Linux scheduler, so it could apply to normal processes, and so it can 
account for host mode, not just guest mode.

-- 
error compiling committee.c: too many arguments to function


       reply	other threads:[~2009-04-22 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1060494.867561240402736300.JavaMail.coremail@app167.163.com>
2009-04-22 12:22 ` Avi Kivity [this message]
2009-04-22 12:34   ` Is guest OS oriented scheduling welcome? Daniel P. Berrange
2009-04-24  0:19 ` Anthony Liguori
2009-04-24  2:55   ` Andrew de Andrade
2009-04-24  6:10 alex
2009-04-24 13:16 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49EF0C1E.2060203@redhat.com \
    --to=avi@redhat.com \
    --cc=aleck_liu@163.com \
    --cc=anthony@codemonkey.ws \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox