From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: Is guest OS oriented scheduling welcome? Date: Thu, 23 Apr 2009 19:19:43 -0500 Message-ID: <49F1059F.5000404@codemonkey.ws> References: <1060494.867561240402736300.JavaMail.coremail@app167.163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, avi@redhat.com To: =?UTF-8?B?5YiY5b+X5bu6?= Return-path: Received: from wa-out-1112.google.com ([209.85.146.178]:8594 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbZDXATr (ORCPT ); Thu, 23 Apr 2009 20:19:47 -0400 Received: by wa-out-1112.google.com with SMTP id j5so414852wah.21 for ; Thu, 23 Apr 2009 17:19:46 -0700 (PDT) In-Reply-To: <1060494.867561240402736300.JavaMail.coremail@app167.163.com> Sender: kvm-owner@vger.kernel.org List-ID: =E5=88=98=E5=BF=97=E5=BB=BA 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 regar= ded 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 cl= oud provider likes this idea. > And, what's more, "Xen and Co.: Communication-aware CPU Scheduling fo= r Consolidated Xen-based Hosting Platforms"(http://www.cse.psu.edu/~sgo= vinda/papers/vee07.pdf) has shown that the standard thread scheduling i= n Linux might not fit the virtualization environment well. By standard thread scheduling, I presume you mean scheduling that=20 doesn't take into account IO? That is, this paper is arguing that in a= =20 virtualization environment, you want to provide temporary=20 disproportionate scheduling to favor IO bound workloads over CPU bound=20 workloads. I don't think you need the credit scheduler to implement this idea in=20 KVM. CFS provides a number of tunables to userspace along with pretty=20 fine grain control ala cgroups. I think that provides you a roughly=20 equivalent interface to userspace that could be used to make scheduling= =20 adjustments based on IO consumption. What are the other motivating factors for wanting to use credit over cf= s? Regards, Anthony Liguori